Skip to content
Snippets Groups Projects
Verified Commit d2db8d3f authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

fix: correct postgres naming

parent fa8821ea
No related branches found
No related tags found
No related merge requests found
Pipeline #2955 passed
......@@ -9,13 +9,13 @@ metadata:
{{- include "postgresql-helm.labels" . | nindent 4 }}
type: Opaque
data:
{{ if empty .Values.postgresqlPassword }}
{{ if empty .Values.postgresPassword }}
# retrieve the secret data using lookup function and when not exists, return an empty dictionary / map as result
{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace $fullname) | default dict }}
{{- $secretData := (get $secretObj "data") | default dict }}
# set $secret to existing secret data or generate a random one when not exists
{{- $secretValue := (get $secretData $fullname) | default (randAlphaNum 48 | b64enc) }}
postgresql-password: {{ $secretValue | quote }}
postgres-password: {{ $secretValue | quote }}
{{ else }}
postgresql-password: "{{ .Values.postgresqlPassword }}"
postgres-password: "{{ .Values.postgresPassword }}"
{{ end }}
\ No newline at end of file
......@@ -47,10 +47,10 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: postgresql_PASSWORD
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
key: "postgresql-password"
key: "postgres-password"
name: {{ include "postgresql-helm.fullname" . }}
ports:
- name: sql
......
......@@ -13,7 +13,7 @@ volume: |-
emptyDir: {}
# if left empty, one will be auto-generated
postgresqlPassword: ""
postgresPassword: ""
tls:
enabled: false
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment