Skip to content

Commit 434c2d3

Browse files
Enhance pgstacbootstrap job configuration by adding extra volume mounts and environment variables for LOAD_FIXTURES and KEEP_ALIVE
1 parent 14c8f00 commit 434c2d3

File tree

1 file changed

+21
-5
lines changed
  • helm-chart/eoapi/templates/pgstacboostrap

1 file changed

+21
-5
lines changed

helm-chart/eoapi/templates/pgstacboostrap/job.yaml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,28 @@ spec:
2424
{{ else }}
2525
['sh', '-c', 'until nc -z $POSTGRES_HOST $POSTGRES_PORT; do echo waiting for db; sleep 10; done;']
2626
{{ end }}
27+
volumeMounts:
28+
{{- with .Values.pgstacBootstrap.settings.extraVolumeMounts }}
29+
{{- toYaml . | nindent 12 }}
30+
{{- end }}
31+
{{- if .Values.pgstacBootstrap.settings.envFrom }}
32+
envFrom:
33+
{{- with .Values.pgstacBootstrap.settings.extraEnvFrom }}
34+
{{- toYaml . | nindent 12 }}
35+
{{- end }}
36+
{{- end }}
2737
env:
28-
{{- with .Values.pgstacBootstrap.settings.envVars }}
29-
- name: POSTGRES_HOST
30-
value: {{ .Values.pgstacBootstrap.settings.envVars.POSTGRES_HOST | quote }}
31-
- name: POSTGRES_PORT
32-
value: {{ .Values.pgstacBootstrap.settings.envVars.POSTGRES_PORT | quote }}
38+
- name: LOAD_FIXTURES
39+
value: {{ .Values.pgstacBootstrap.settings.envVars.LOAD_FIXTURES | quote }}
40+
- name: KEEP_ALIVE
41+
value: {{ .Values.pgstacBootstrap.settings.envVars.KEEP_ALIVE | quote }}
42+
{{- with .Values.pgstacBootstrap.settings.extraEnvVars }}
43+
{{- toYaml . | nindent 12 }}
44+
{{- end }}
45+
# TODO (emmanuel): to be removed when we have a generic way to
46+
# inject secrets in the pod
47+
{{- if or .Values.postgrescluster.enabled .Values.db.enabled }}
48+
{{ include "eoapi.pgstacSecrets" . | nindent 12 }}
3349
{{- end }}
3450
containers:
3551
- name: pgstacbootstrap

0 commit comments

Comments
 (0)