netbird: move authSecret out of git into k8s secret (netbird-relay-auth), render via init container
This commit is contained in:
@@ -4,7 +4,7 @@ metadata:
|
|||||||
name: netbird-server-config
|
name: netbird-server-config
|
||||||
namespace: netbird
|
namespace: netbird
|
||||||
data:
|
data:
|
||||||
config.yaml: |
|
config.yaml.tpl: |
|
||||||
server:
|
server:
|
||||||
listenAddress: ":80"
|
listenAddress: ":80"
|
||||||
exposedAddress: "https://netbird.archfox.org:443"
|
exposedAddress: "https://netbird.archfox.org:443"
|
||||||
@@ -23,7 +23,7 @@ data:
|
|||||||
domains: []
|
domains: []
|
||||||
email: ""
|
email: ""
|
||||||
awsRoute53: false
|
awsRoute53: false
|
||||||
authSecret: "4bd2ecf3f8be38cd6e640d4eb5f844d8d73c094be7e036b7c6ce1e1b67396e1b"
|
authSecret: "__AUTH_SECRET__"
|
||||||
dataDir: "/var/lib/netbird/"
|
dataDir: "/var/lib/netbird/"
|
||||||
disableAnonymousMetrics: false
|
disableAnonymousMetrics: false
|
||||||
disableGeoliteUpdate: false
|
disableGeoliteUpdate: false
|
||||||
|
|||||||
@@ -13,6 +13,25 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: netbird-server
|
app: netbird-server
|
||||||
spec:
|
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:
|
containers:
|
||||||
- name: netbird-server
|
- name: netbird-server
|
||||||
image: netbirdio/netbird-server:latest
|
image: netbirdio/netbird-server:latest
|
||||||
@@ -29,14 +48,16 @@ spec:
|
|||||||
name: netbird-encryption
|
name: netbird-encryption
|
||||||
key: encryptionKey
|
key: encryptionKey
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config-rendered
|
||||||
mountPath: /etc/netbird
|
mountPath: /etc/netbird
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /var/lib/netbird
|
mountPath: /var/lib/netbird
|
||||||
volumes:
|
volumes:
|
||||||
- name: config
|
- name: config-tpl
|
||||||
configMap:
|
configMap:
|
||||||
name: netbird-server-config
|
name: netbird-server-config
|
||||||
|
- name: config-rendered
|
||||||
|
emptyDir: {}
|
||||||
- name: data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: netbird-data
|
claimName: netbird-data
|
||||||
|
|||||||
Reference in New Issue
Block a user