Make runtime namespace configurable (#145)

Making the runtime namespace configurable makes it possible to run
locally outside of the cluster. This is useful for quick development
testing.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
Philip Laine
2026-03-18 12:00:31 +01:00
committed by GitHub
parent 8267cc406a
commit ccf819d2ff
3 changed files with 39 additions and 34 deletions
@@ -45,6 +45,7 @@ spec:
- --leader-elect
- --health-probe-bind-address=:{{ .Values.operator.livenessProbe.port }}
- --webhook-cert-path=/tmp/k8s-webhook-server/serving-certs
- --runtime-namespace=$(POD_NAMESPACE)
{{- if .Values.managementURL }}
- --netbird-management-url={{.Values.managementURL}}
{{- end }}
@@ -87,8 +88,12 @@ spec:
periodSeconds: {{ .Values.operator.livenessProbe.periodSeconds }}
successThreshold: {{ .Values.operator.livenessProbe.successThreshold }}
timeoutSeconds: {{ .Values.operator.livenessProbe.timeoutSeconds }}
{{- if or .Values.netbirdAPI.key .Values.netbirdAPI.keyFromSecret }}
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if or .Values.netbirdAPI.key .Values.netbirdAPI.keyFromSecret }}
- name: NB_API_KEY
valueFrom:
secretKeyRef: