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: ...@@ -9,13 +9,13 @@ metadata:
{{- include "postgresql-helm.labels" . | nindent 4 }} {{- include "postgresql-helm.labels" . | nindent 4 }}
type: Opaque type: Opaque
data: 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 # 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 }} {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace $fullname) | default dict }}
{{- $secretData := (get $secretObj "data") | default dict }} {{- $secretData := (get $secretObj "data") | default dict }}
# set $secret to existing secret data or generate a random one when not exists # set $secret to existing secret data or generate a random one when not exists
{{- $secretValue := (get $secretData $fullname) | default (randAlphaNum 48 | b64enc) }} {{- $secretValue := (get $secretData $fullname) | default (randAlphaNum 48 | b64enc) }}
postgresql-password: {{ $secretValue | quote }} postgres-password: {{ $secretValue | quote }}
{{ else }} {{ else }}
postgresql-password: "{{ .Values.postgresqlPassword }}" postgres-password: "{{ .Values.postgresPassword }}"
{{ end }} {{ end }}
\ No newline at end of file
...@@ -47,10 +47,10 @@ spec: ...@@ -47,10 +47,10 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
env: env:
- name: postgresql_PASSWORD - name: POSTGRES_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
key: "postgresql-password" key: "postgres-password"
name: {{ include "postgresql-helm.fullname" . }} name: {{ include "postgresql-helm.fullname" . }}
ports: ports:
- name: sql - name: sql
......
...@@ -13,7 +13,7 @@ volume: |- ...@@ -13,7 +13,7 @@ volume: |-
emptyDir: {} emptyDir: {}
# if left empty, one will be auto-generated # if left empty, one will be auto-generated
postgresqlPassword: "" postgresPassword: ""
tls: tls:
enabled: false 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