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
This commit is contained in:
Alexander Olofsson 2023-10-10 14:17:57 +02:00
parent b23c6f903e
commit ec456fb449
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
3 changed files with 15 additions and 1 deletions

View file

@ -10,7 +10,7 @@ icon: https://raw.githubusercontent.com/digitalocean/netbox/develop/netbox/proje
appVersion: 3.6.3 appVersion: 3.6.3
type: application type: application
version: 5.5.2 version: 5.5.3
maintainers: maintainers:
- name: Alexander Olofsson - name: Alexander Olofsson
email: ace@haxalot.com email: ace@haxalot.com

View file

@ -42,6 +42,13 @@ spec:
name: {{ .Values.redis.auth.existingSecret | default (include "netbox.redis.fullname" .) }} name: {{ .Values.redis.auth.existingSecret | default (include "netbox.redis.fullname" .) }}
key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }} key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }}
{{- end }} {{- 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) }} {{- if (or .Values.postgresql.auth.existingSecret .Values.postgresql.enabled) }}
- name: DB_PASSWORD - name: DB_PASSWORD
valueFrom: valueFrom:

View file

@ -44,6 +44,13 @@ spec:
name: {{ .Values.redis.auth.existingSecret | default (include "netbox.redis.fullname" .) }} name: {{ .Values.redis.auth.existingSecret | default (include "netbox.redis.fullname" .) }}
key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }} key: {{ .Values.redis.auth.existingSecretPasswordKey | default "redis-password" }}
{{- end }} {{- 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) }} {{- if (or .Values.postgresql.auth.existingSecret .Values.postgresql.enabled) }}
- name: DB_PASSWORD - name: DB_PASSWORD
valueFrom: valueFrom: