Skip to content

Commit

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

specific service dbcreds for dbcreate
  • Loading branch information
hadams95 authored Mar 18, 2024
2 parents dcfb3a7 + 82d7266 commit a2a4315
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions helm/common/templates/_db_setup_job.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ spec:
name: {{ .Release.Name }}-postgresql
key: postgres-password
optional: false
{{- else if .Values.postgres.externalSecret }}
valueFrom:
secretKeyRef:
name: {{ .Values.postgres.externalSecret }}
key: password
optional: false
{{- else if $.Values.global.postgres.externalSecret }}
valueFrom:
secretKeyRef:
Expand All @@ -69,7 +75,13 @@ spec:
value: {{ .Values.global.postgres.master.password | quote}}
{{- end }}
- name: PGUSER
{{- if $.Values.global.postgres.externalSecret }}
{{- if .Values.postgres.externalSecret }}
valueFrom:
secretKeyRef:
name: {{ .Values.postgres.externalSecret }}
key: username
optional: false
{{- else if $.Values.global.postgres.externalSecret }}
valueFrom:
secretKeyRef:
name: {{ $.Values.global.postgres.externalSecret }}
Expand All @@ -79,7 +91,13 @@ spec:
value: {{ .Values.global.postgres.master.username | quote }}
{{- end }}
- name: PGPORT
{{- if $.Values.global.postgres.externalSecret }}
{{- if .Values.postgres.externalSecret }}
valueFrom:
secretKeyRef:
name: {{ .Values.postgres.externalSecret }}
key: port
optional: false
{{- else if $.Values.global.postgres.externalSecret }}
valueFrom:
secretKeyRef:
name: {{ $.Values.global.postgres.externalSecret }}
Expand All @@ -91,6 +109,12 @@ spec:
- name: PGHOST
{{- if $.Values.global.dev }}
value: "{{ .Release.Name }}-postgresql"
{{- else if .Values.postgres.externalSecret }}
valueFrom:
secretKeyRef:
name: {{ .Values.postgres.externalSecret }}
key: host
optional: false
{{- else if $.Values.global.postgres.externalSecret }}
valueFrom:
secretKeyRef:
Expand Down

0 comments on commit a2a4315

Please sign in to comment.