Skip to content

Commit

Permalink
Merge pull request #7 from krumIO/fix/dbcreate-jobs-with-external-sec…
Browse files Browse the repository at this point in the history
…rets

reference existing variable for dbcreds external secret name in dbcreate job
  • Loading branch information
hadams95 authored Mar 18, 2024
2 parents a2a4315 + 26a1737 commit c33c4f4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions helm/common/templates/_db_setup_job.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ spec:
name: {{ .Release.Name }}-postgresql
key: postgres-password
optional: false
{{- else if .Values.postgres.externalSecret }}
{{- else if .Values.externalSecrets.dbcreds }}
valueFrom:
secretKeyRef:
name: {{ .Values.postgres.externalSecret }}
name: {{ .Values.externalSecrets.dbcreds }}
key: password
optional: false
{{- else if $.Values.global.postgres.externalSecret }}
Expand All @@ -75,10 +75,10 @@ spec:
value: {{ .Values.global.postgres.master.password | quote}}
{{- end }}
- name: PGUSER
{{- if .Values.postgres.externalSecret }}
{{- if .Values.externalSecrets.dbcreds }}
valueFrom:
secretKeyRef:
name: {{ .Values.postgres.externalSecret }}
name: {{ .Values.externalSecrets.dbcreds }}
key: username
optional: false
{{- else if $.Values.global.postgres.externalSecret }}
Expand All @@ -91,10 +91,10 @@ spec:
value: {{ .Values.global.postgres.master.username | quote }}
{{- end }}
- name: PGPORT
{{- if .Values.postgres.externalSecret }}
{{- if .Values.externalSecrets.dbcreds }}
valueFrom:
secretKeyRef:
name: {{ .Values.postgres.externalSecret }}
name: {{ .Values.externalSecrets.dbcreds }}
key: port
optional: false
{{- else if $.Values.global.postgres.externalSecret }}
Expand All @@ -109,10 +109,10 @@ spec:
- name: PGHOST
{{- if $.Values.global.dev }}
value: "{{ .Release.Name }}-postgresql"
{{- else if .Values.postgres.externalSecret }}
{{- else if .Values.externalSecrets.dbcreds }}
valueFrom:
secretKeyRef:
name: {{ .Values.postgres.externalSecret }}
name: {{ .Values.externalSecrets.dbcreds }}
key: host
optional: false
{{- else if $.Values.global.postgres.externalSecret }}
Expand Down

0 comments on commit c33c4f4

Please sign in to comment.