diff --git a/charts/app/templates/backend/templates/deployment.yaml b/charts/app/templates/backend/templates/deployment.yaml index 259d9d597..6d8fd5ab0 100644 --- a/charts/app/templates/backend/templates/deployment.yaml +++ b/charts/app/templates/backend/templates/deployment.yaml @@ -34,7 +34,7 @@ spec: imagePullPolicy: {{ default "Always" .Values.backend.imagePullPolicy }} envFrom: - secretRef: - name: {{.Release.Name}} + name: {{.Release.Name}}-flyway env: - name: FLYWAY_BASELINE_ON_MIGRATE value: "true" @@ -59,7 +59,7 @@ spec: imagePullPolicy: {{ default "Always" .Values.backend.imagePullPolicy }} envFrom: - secretRef: - name: {{.Release.Name}} + name: {{.Release.Name}}-backend env: - name: LOG_LEVEL value: info diff --git a/charts/app/templates/secret.yaml b/charts/app/templates/secret.yaml index a5f3c4004..8f5ef77d5 100644 --- a/charts/app/templates/secret.yaml +++ b/charts/app/templates/secret.yaml @@ -15,27 +15,44 @@ apiVersion: v1 kind: Secret metadata: - name: {{ .Release.Name }} + name: {{ .Release.Name }}-backend labels: {{- include "labels" . | nindent 4 }} {{- if .Values.global.secrets.persist }} annotations: helm.sh/resource-policy: keep {{- end }} data: - databasePassword: {{ $databasePassword | quote }} - postgres-password: {{ $databasePassword | quote }} - password: {{ $databasePassword | quote }} - databaseUser: {{ $databaseUser | b64enc | quote }} - databaseName: {{ $databaseName | b64enc | quote }} - databaseURL: {{ $databaseURL | b64enc | quote }} - databaseJDBCURL: {{ $databaseJDBCURL | b64enc | quote }} - databaseJDBCURLNoCreds: {{ $databaseJDBCURLNoCreds | b64enc | quote }} - FLYWAY_URL: {{ $databaseJDBCURLNoCreds | b64enc | quote }} - FLYWAY_USER: {{ $databaseUser | b64enc | quote }} - FLYWAY_PASSWORD: {{ $databasePassword | quote }} POSTGRES_PASSWORD: {{ $databasePassword | quote }} POSTGRES_USER: {{ $databaseUser | b64enc | quote }} POSTGRES_DATABASE: {{ $databaseName | b64enc | quote }} POSTGRES_HOST: {{ $hostWithoutPort | b64enc | quote }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Release.Name }}-flyway + labels: {{- include "labels" . | nindent 4 }} + {{- if .Values.global.secrets.persist }} + annotations: + helm.sh/resource-policy: keep + {{- end }} +data: + FLYWAY_URL: {{ $databaseJDBCURLNoCreds | b64enc | quote }} + FLYWAY_USER: {{ $databaseUser | b64enc | quote }} + FLYWAY_PASSWORD: {{ $databasePassword | quote }} + +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Release.Name }}-database + labels: {{- include "labels" . | nindent 4 }} + {{- if .Values.global.secrets.persist }} + annotations: + helm.sh/resource-policy: keep + {{- end }} +data: + postgres-password: {{ $databasePassword | quote }} + password: {{ $databasePassword | quote }} {{- end }} diff --git a/charts/app/values.yaml b/charts/app/values.yaml index e7ac31006..27754b335 100644 --- a/charts/app/values.yaml +++ b/charts/app/values.yaml @@ -213,7 +213,7 @@ bitnami-pg: repository: bcgov/nr-containers/bitnami/postgresql tag: 15.7.0 auth: - existingSecret: '{{ .Release.Name }}' + existingSecret: '{{ .Release.Name }}-database' username: 'quickstart' database: quickstart shmVolume: