netbird: move authSecret out of git into k8s secret (netbird-relay-auth), render via init container

This commit is contained in:
2026-07-23 13:45:04 -05:00
parent 5b62e26752
commit f9289fa766
2 changed files with 25 additions and 4 deletions
+23 -2
View File
@@ -13,6 +13,25 @@ spec:
labels:
app: netbird-server
spec:
initContainers:
- name: render-config
image: busybox
env:
- name: AUTH_SECRET
valueFrom:
secretKeyRef:
name: netbird-relay-auth
key: authSecret
command:
- sh
- -c
- |
sed "s|__AUTH_SECRET__|$AUTH_SECRET|g" /tpl/config.yaml.tpl > /etc/netbird/config.yaml
volumeMounts:
- name: config-tpl
mountPath: /tpl
- name: config-rendered
mountPath: /etc/netbird
containers:
- name: netbird-server
image: netbirdio/netbird-server:latest
@@ -29,14 +48,16 @@ spec:
name: netbird-encryption
key: encryptionKey
volumeMounts:
- name: config
- name: config-rendered
mountPath: /etc/netbird
- name: data
mountPath: /var/lib/netbird
volumes:
- name: config
- name: config-tpl
configMap:
name: netbird-server-config
- name: config-rendered
emptyDir: {}
- name: data
persistentVolumeClaim:
claimName: netbird-data