diff --git a/helm/cas-bciers/templates/_helpers.tpl b/helm/cas-bciers/templates/_helpers.tpl index c573d55c8b..552eab1ef2 100644 --- a/helm/cas-bciers/templates/_helpers.tpl +++ b/helm/cas-bciers/templates/_helpers.tpl @@ -141,16 +141,6 @@ Define environment variables for the application. value: '*' - name: BACKEND_HOST value: {{ .Values.backend.route.host }} -- name: DJANGO_SUPERUSER_USERNAME - valueFrom: - secretKeyRef: - key: username - name: django-superuser -- name: DJANGO_SUPERUSER_PASSWORD - valueFrom: - secretKeyRef: - key: password - name: django-superuser - name: GS_BUCKET_NAME valueFrom: secretKeyRef: diff --git a/helm/cas-bciers/templates/backend/deployment.yaml b/helm/cas-bciers/templates/backend/deployment.yaml index 22ebf7e1d5..74b9041ede 100644 --- a/helm/cas-bciers/templates/backend/deployment.yaml +++ b/helm/cas-bciers/templates/backend/deployment.yaml @@ -34,6 +34,16 @@ spec: - "create_superuser" env: {{- include "cas-bciers.backendEnvVars" . | nindent 12 }} + - name: DJANGO_SUPERUSER_USERNAME + valueFrom: + secretKeyRef: + key: username + name: django-superuser + - name: DJANGO_SUPERUSER_PASSWORD + valueFrom: + secretKeyRef: + key: password + name: django-superuser volumeMounts: - mountPath: "/attachment-credentials" name: gcs-attachment-credentials @@ -45,6 +55,18 @@ spec: imagePullPolicy: {{ .Values.backend.image.pullPolicy }} env: {{- include "cas-bciers.backendEnvVars" . | nindent 12 }} + {{- if hasSuffix "-dev" .Release.Namespace }} + - name: DJANGO_SUPERUSER_USERNAME + valueFrom: + secretKeyRef: + key: username + name: django-superuser + - name: DJANGO_SUPERUSER_PASSWORD + valueFrom: + secretKeyRef: + key: password + name: django-superuser + {{- end }} {{- if hasSuffix "-prod" .Release.Namespace }} - name: SENTRY_ENVIRONMENT value: {{ include "cas-bciers.namespaceSuffix" . }} diff --git a/helm/cas-registration/templates/_helpers.tpl b/helm/cas-registration/templates/_helpers.tpl index 45b27153e2..9a7200f798 100644 --- a/helm/cas-registration/templates/_helpers.tpl +++ b/helm/cas-registration/templates/_helpers.tpl @@ -140,16 +140,6 @@ Define environment variables for the application. value: '*' - name: BACKEND_HOST value: {{ .Values.backend.route.host }} -- name: DJANGO_SUPERUSER_USERNAME - valueFrom: - secretKeyRef: - key: username - name: django-superuser -- name: DJANGO_SUPERUSER_PASSWORD - valueFrom: - secretKeyRef: - key: password - name: django-superuser - name: GS_BUCKET_NAME valueFrom: secretKeyRef: diff --git a/helm/cas-registration/templates/backend/deployment.yaml b/helm/cas-registration/templates/backend/deployment.yaml index 0ede5eb312..ccd899d192 100644 --- a/helm/cas-registration/templates/backend/deployment.yaml +++ b/helm/cas-registration/templates/backend/deployment.yaml @@ -34,6 +34,16 @@ spec: - "create_superuser" env: {{- include "cas-registration.backendEnvVars" . | nindent 12 }} + - name: DJANGO_SUPERUSER_USERNAME + valueFrom: + secretKeyRef: + key: username + name: django-superuser + - name: DJANGO_SUPERUSER_PASSWORD + valueFrom: + secretKeyRef: + key: password + name: django-superuser volumeMounts: - mountPath: "/attachment-credentials" name: gcs-attachment-credentials @@ -45,6 +55,18 @@ spec: imagePullPolicy: {{ .Values.backend.image.pullPolicy }} env: {{- include "cas-registration.backendEnvVars" . | nindent 12 }} + {{- if hasSuffix "-dev" .Release.Namespace }} + - name: DJANGO_SUPERUSER_USERNAME + valueFrom: + secretKeyRef: + key: username + name: django-superuser + - name: DJANGO_SUPERUSER_PASSWORD + valueFrom: + secretKeyRef: + key: password + name: django-superuser + {{- end }} {{- if hasSuffix "-prod" .Release.Namespace }} - name: SENTRY_ENVIRONMENT value: {{ include "cas-registration.namespaceSuffix" . }}