From ec456fb449497737b3cca0124caf28544cad2c2a Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Tue, 10 Oct 2023 14:17:57 +0200 Subject: [PATCH] netbox: Ensure existingDjangoSecret is imported Both worker and housekeeping would miss pulling the django secret if it's specified from an external secret. Fixes #52 --- charts/netbox/Chart.yaml | 2 +- charts/netbox/templates/deployment-housekeeping.yaml | 7 +++++++ charts/netbox/templates/deployment-worker.yaml | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/charts/netbox/Chart.yaml b/charts/netbox/Chart.yaml index 58283ce..e866570 100644 --- a/charts/netbox/Chart.yaml +++ b/charts/netbox/Chart.yaml @@ -10,7 +10,7 @@ icon: https://raw.githubusercontent.com/digitalocean/netbox/develop/netbox/proje appVersion: 3.6.3 type: application -version: 5.5.2 +version: 5.5.3 maintainers: - name: Alexander Olofsson email: ace@haxalot.com diff --git a/charts/netbox/templates/deployment-housekeeping.yaml b/charts/netbox/templates/deployment-housekeeping.yaml index 5ef682f..ba5245d 100644 --- a/charts/netbox/templates/deployment-housekeeping.yaml +++ b/charts/netbox/templates/deployment-housekeeping.yaml @@ -42,6 +42,13 @@ spec: name: {{ .Values.redis.auth.existingSecret | default (include "netbox.redis.fullname" .) }} key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }} {{- end }} + {{- if .Values.existingDjangoSecret }} + - name: SECRET_KEY + valueFrom: + secretKeyRef: + name: {{ .Values.existingDjangoSecret }} + key: {{ .Values.existingDjangoSecretKey }} + {{- end }} {{- if (or .Values.postgresql.auth.existingSecret .Values.postgresql.enabled) }} - name: DB_PASSWORD valueFrom: diff --git a/charts/netbox/templates/deployment-worker.yaml b/charts/netbox/templates/deployment-worker.yaml index 844a791..e5b2cdc 100644 --- a/charts/netbox/templates/deployment-worker.yaml +++ b/charts/netbox/templates/deployment-worker.yaml @@ -44,6 +44,13 @@ spec: name: {{ .Values.redis.auth.existingSecret | default (include "netbox.redis.fullname" .) }} key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }} {{- end }} + {{- if .Values.existingDjangoSecret }} + - name: SECRET_KEY + valueFrom: + secretKeyRef: + name: {{ .Values.existingDjangoSecret }} + key: {{ .Values.existingDjangoSecretKey }} + {{- end }} {{- if (or .Values.postgresql.auth.existingSecret .Values.postgresql.enabled) }} - name: DB_PASSWORD valueFrom: