Compare commits

..

11 Commits

Author SHA1 Message Date
Ultradesu 859a118e0a awg migration
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 7s
Check with kubeconform / lint (push) Successful in 8s
Auto-update README / Generate README and Create MR (push) Successful in 11s
2026-07-06 10:42:52 +03:00
ab dc8e66e604 Update k8s/apps/amnezia/fellow-deployment.yaml
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 10s
Check with kubeconform / lint (push) Successful in 12s
Auto-update README / Generate README and Create MR (push) Successful in 6s
2026-07-05 10:33:41 +00:00
ab 90bce2980e Migrated awg
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 5s
Check with kubeconform / lint (push) Successful in 4s
Auto-update README / Generate README and Create MR (push) Successful in 5s
2026-07-02 16:58:29 +03:00
ab 69947c9eee Migrated awg
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 6s
Check with kubeconform / lint (push) Successful in 5s
Auto-update README / Generate README and Create MR (push) Successful in 5s
2026-07-02 16:56:27 +03:00
ab 4d98223004 Migrated awg
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 2m30s
Check with kubeconform / lint (push) Successful in 7s
Auto-update README / Generate README and Create MR (push) Successful in 5s
2026-07-02 16:55:48 +03:00
ab fdd79fcff3 Migrated awg
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 6s
Check with kubeconform / lint (push) Successful in 7s
Auto-update README / Generate README and Create MR (push) Successful in 5s
2026-07-02 16:39:08 +03:00
Ultradesu 04044b32e0 AWG: Added migration
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 6s
Check with kubeconform / lint (push) Successful in 6s
Auto-update README / Generate README and Create MR (push) Successful in 6s
2026-07-01 13:43:17 +03:00
Ultradesu aa4c9dce08 Added amnezia-fellow DB user
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 7s
Check with kubeconform / lint (push) Successful in 6s
Auto-update README / Generate README and Create MR (push) Successful in 5s
2026-07-01 13:09:46 +03:00
Ultradesu c31ca20fb0 Fix amnezia exporter's config
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 6s
Check with kubeconform / lint (push) Successful in 7s
Auto-update README / Generate README and Create MR (push) Successful in 4s
2026-06-30 14:00:07 +03:00
Ultradesu b42ba8d68f Added config reload
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 2m33s
Check with kubeconform / lint (push) Successful in 7s
Auto-update README / Generate README and Create MR (push) Successful in 5s
2026-06-29 21:08:54 +03:00
Ultradesu f8c69c2434 Added config reload
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 58s
Check with kubeconform / lint (push) Successful in 7s
Auto-update README / Generate README and Create MR (push) Successful in 5s
2026-06-29 21:00:55 +03:00
7 changed files with 164 additions and 24 deletions
-2
View File
@@ -42,7 +42,6 @@ ArgoCD homelab project
| Application | Status |
| :--- | :---: |
| **amnezia** | [![amnezia](https://ag.hexor.cy/api/badge?name=amnezia&revision=true)](https://ag.hexor.cy/applications/argocd/amnezia) |
| **comfyui** | [![comfyui](https://ag.hexor.cy/api/badge?name=comfyui&revision=true)](https://ag.hexor.cy/applications/argocd/comfyui) |
| **furumi** | [![furumi](https://ag.hexor.cy/api/badge?name=furumi&revision=true)](https://ag.hexor.cy/applications/argocd/furumi) |
| **gitea** | [![gitea](https://ag.hexor.cy/api/badge?name=gitea&revision=true)](https://ag.hexor.cy/applications/argocd/gitea) |
@@ -54,7 +53,6 @@ ArgoCD homelab project
| **k8s-secrets** | [![k8s-secrets](https://ag.hexor.cy/api/badge?name=k8s-secrets&revision=true)](https://ag.hexor.cy/applications/argocd/k8s-secrets) |
| **khm** | [![khm](https://ag.hexor.cy/api/badge?name=khm&revision=true)](https://ag.hexor.cy/applications/argocd/khm) |
| **lidarr** | [![lidarr](https://ag.hexor.cy/api/badge?name=lidarr&revision=true)](https://ag.hexor.cy/applications/argocd/lidarr) |
| **llamacpp** | [![llamacpp](https://ag.hexor.cy/api/badge?name=llamacpp&revision=true)](https://ag.hexor.cy/applications/argocd/llamacpp) |
| **matrix** | [![matrix](https://ag.hexor.cy/api/badge?name=matrix&revision=true)](https://ag.hexor.cy/applications/argocd/matrix) |
| **mtproxy** | [![mtproxy](https://ag.hexor.cy/api/badge?name=mtproxy&revision=true)](https://ag.hexor.cy/applications/argocd/mtproxy) |
| **n8n** | [![n8n](https://ag.hexor.cy/api/badge?name=n8n&revision=true)](https://ag.hexor.cy/applications/argocd/n8n) |
+57 -1
View File
@@ -126,7 +126,7 @@ data:
set -euo pipefail
SERVER_CONFIG="/etc/amnezia/server/awg0.conf"
CLIENTS_DIR="/etc/amnezia/clients"
CLIENTS_DIR="${AMNEZIAWG_CLIENTS_DIR:-/run/amnezia/clients}"
RUNTIME_CONFIG="/run/amnezia/awg0.conf"
SYNC_CONFIG="/run/amnezia/awg0.sync.conf"
STATUS_FILE="/run/amnezia/reload-status"
@@ -229,6 +229,62 @@ data:
write_reload_status applied "${initial_hash}"
watch_client_config "${initial_hash}"
client-secret-sync.sh: |
#!/usr/bin/env bash
set -euo pipefail
CLIENT_SECRET="${AMNEZIAWG_CLIENT_SECRET:-amneziawg-clients}"
CLIENT_SECRET_KEY="${AMNEZIAWG_CLIENT_SECRET_KEY:-peers.conf}"
CLIENTS_DIR="${AMNEZIAWG_CLIENTS_DIR:-/run/amnezia/clients}"
PEERS_FILE="${CLIENTS_DIR}/peers.conf"
SYNC_INTERVAL="${AMNEZIAWG_CLIENT_SECRET_SYNC_INTERVAL:-5}"
NAMESPACE="${POD_NAMESPACE:-$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)}"
write_empty_once() {
mkdir -p "${CLIENTS_DIR}"
if [ ! -f "${PEERS_FILE}" ]; then
: > "${PEERS_FILE}"
chmod 0600 "${PEERS_FILE}"
fi
}
sync_once() {
mkdir -p "${CLIENTS_DIR}"
local tmp_file="${PEERS_FILE}.tmp"
local encoded=""
if ! encoded="$(kubectl get secret "${CLIENT_SECRET}" -n "${NAMESPACE}" -o "go-template={{ index .data \"${CLIENT_SECRET_KEY}\" }}" 2>/dev/null)"; then
echo "WARN: failed to read Secret ${NAMESPACE}/${CLIENT_SECRET}; keeping current peers" >&2
write_empty_once
return 0
fi
if [ -n "${encoded}" ]; then
printf '%s' "${encoded}" | base64 -d > "${tmp_file}"
else
: > "${tmp_file}"
fi
chmod 0600 "${tmp_file}"
if [ -f "${PEERS_FILE}" ] && cmp -s "${tmp_file}" "${PEERS_FILE}"; then
rm -f "${tmp_file}"
return 0
fi
mv "${tmp_file}" "${PEERS_FILE}"
echo "Synced AmneziaWG client peers from Secret ${NAMESPACE}/${CLIENT_SECRET}:${CLIENT_SECRET_KEY}"
}
if [ "${1:-}" = "once" ]; then
sync_once
exit 0
fi
while true; do
sync_once || true
sleep "${SYNC_INTERVAL}"
done
status-patch.sh: |
#!/usr/bin/env bash
set -euo pipefail
+52 -10
View File
@@ -6,8 +6,9 @@ metadata:
labels:
app: amneziawg
annotations:
reloader.stakater.com/auto: "false"
secret.reloader.stakater.com/reload: "amneziawg-server"
configmap.reloader.stakater.com/reload: "amneziawg-scripts"
configmap.reloader.stakater.com/reload: "amneziawg-scripts,amneziawg-exporter-redis"
spec:
selector:
matchLabels:
@@ -36,7 +37,9 @@ spec:
- |
set -euo pipefail
cp /usr/bin/awg /shared-bin/awg
chmod 0755 /shared-bin/awg
cp /lib/ld-musl-x86_64.so.1 /shared-bin/ld-musl-x86_64.so.1
cp /lib/ld-musl-x86_64.so.1 /shared-bin/libc.musl-x86_64.so.1
chmod 0755 /shared-bin/awg /shared-bin/ld-musl-x86_64.so.1 /shared-bin/libc.musl-x86_64.so.1
volumeMounts:
- name: awg-bin
mountPath: /shared-bin
@@ -78,6 +81,26 @@ spec:
kubectl create secret generic amneziawg-endpoints -n "${NAMESPACE}" \
--from-literal="${NODE_NAME}=${VALUE}"
fi
- name: sync-client-secret
image: bitnami/kubectl:latest
imagePullPolicy: IfNotPresent
command:
- /bin/bash
- /scripts/client-secret-sync.sh
- once
resources:
requests:
memory: "32Mi"
cpu: "10m"
limits:
memory: "128Mi"
cpu: "100m"
volumeMounts:
- name: scripts
mountPath: /scripts
readOnly: true
- name: runtime-config
mountPath: /run/amnezia
containers:
- name: amneziawg
image: amneziavpn/amneziawg-go:latest
@@ -126,9 +149,6 @@ spec:
- name: server-config
mountPath: /etc/amnezia/server
readOnly: true
- name: client-config
mountPath: /etc/amnezia/clients
readOnly: true
- name: scripts
mountPath: /scripts
readOnly: true
@@ -160,6 +180,25 @@ spec:
readOnly: true
- name: runtime-config
mountPath: /run/amnezia
- name: client-secret-sync
image: bitnami/kubectl:latest
imagePullPolicy: IfNotPresent
command:
- /bin/bash
- /scripts/client-secret-sync.sh
resources:
requests:
memory: "32Mi"
cpu: "10m"
limits:
memory: "128Mi"
cpu: "100m"
volumeMounts:
- name: scripts
mountPath: /scripts
readOnly: true
- name: runtime-config
mountPath: /run/amnezia
- name: amneziawg-exporter-redis
image: redis:alpine
imagePullPolicy: IfNotPresent
@@ -211,6 +250,14 @@ spec:
mountPath: /usr/bin/awg
subPath: awg
readOnly: true
- name: awg-bin
mountPath: /lib/ld-musl-x86_64.so.1
subPath: ld-musl-x86_64.so.1
readOnly: true
- name: awg-bin
mountPath: /lib/libc.musl-x86_64.so.1
subPath: libc.musl-x86_64.so.1
readOnly: true
volumes:
- name: server-config
secret:
@@ -219,11 +266,6 @@ spec:
items:
- key: awg0.conf
path: awg0.conf
- name: client-config
secret:
secretName: amneziawg-clients
optional: true
defaultMode: 0600
- name: scripts
configMap:
name: amneziawg-scripts
@@ -8,8 +8,8 @@ metadata:
component: exporter
data:
redis.conf: |
bind 0.0.0.0
protected-mode no
bind 127.0.0.1
protected-mode yes
port 6379
tcp-backlog 511
timeout 0
@@ -21,8 +21,12 @@ data:
databases 16
always-show-logo no
set-proc-title no
save 3600 1
save ""
appendonly no
stop-writes-on-bgsave-error no
rdbcompression yes
rdbchecksum yes
dir /data
rename-command CONFIG ""
rename-command SAVE ""
rename-command BGSAVE ""
+29
View File
@@ -48,3 +48,32 @@ spec:
remoteRef:
key: 3092dc7c-41dd-461a-9f7a-377727f47e93
property: fields[1].value
---
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: amnezia-fellow
spec:
target:
name: amnezia-fellow
deletionPolicy: Delete
template:
engineVersion: v2
type: Opaque
data:
database-url: |-
postgresql://amnezia_fellow:{{ .amnezia_fellow | urlquery }}@psql.psql.svc:5432/amnezia_fellow
postgres-password: |-
{{ .amnezia_fellow }}
data:
- secretKey: amnezia_fellow
sourceRef:
storeRef:
name: vaultwarden-login
kind: ClusterSecretStore
remoteRef:
conversionStrategy: Default
decodingStrategy: None
metadataPolicy: None
key: 2a9deb39-ef22-433e-a1be-df1555625e22
property: fields[19].value
+6 -8
View File
@@ -5,6 +5,8 @@ metadata:
name: amnezia-fellow
labels:
app: amnezia-fellow
annotations:
secret.reloader.stakater.com/reload: "amnezia-fellow"
spec:
replicas: 1
strategy:
@@ -31,7 +33,10 @@ spec:
protocol: TCP
env:
- name: AMNEZIA_FELLOW_DATABASE_URL
value: "sqlite:///data/amnezia-fellow.sqlite3?mode=rwc"
valueFrom:
secretKeyRef:
name: amnezia-fellow
key: database-url
- name: AMNEZIA_FELLOW_K8S_NAMESPACE
value: "amnezia"
- name: AMNEZIA_FELLOW_K8S_CLIENTS_SECRET
@@ -65,10 +70,3 @@ spec:
limits:
cpu: "500m"
memory: "512Mi"
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: amnezia-fellow-data
+13
View File
@@ -140,6 +140,8 @@ spec:
{{ .furumi_dev }}
USER_keycloak: |-
{{ .keycloak }}
USER_amnezia_fellow: |-
{{ .amnezia_fellow }}
data:
- secretKey: authentik
sourceRef:
@@ -339,3 +341,14 @@ spec:
metadataPolicy: None
key: 2a9deb39-ef22-433e-a1be-df1555625e22
property: fields[18].value
- secretKey: amnezia_fellow
sourceRef:
storeRef:
name: vaultwarden-login
kind: ClusterSecretStore
remoteRef:
conversionStrategy: Default
decodingStrategy: None
metadataPolicy: None
key: 2a9deb39-ef22-433e-a1be-df1555625e22
property: fields[19].value