Skip to content

Commit 9be81f7

Browse files
Refactor pgstacBootstrap job configuration to use extraEnvFrom and extraEnvVars for environment variable management in job.yaml and values.yaml
1 parent 83997cd commit 9be81f7

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
{{- with .Values.pgstacBootstrap.settings.extraVolumeMounts }}
2929
{{- toYaml . | nindent 12 }}
3030
{{- end }}
31-
{{- if .Values.pgstacBootstrap.settings.envFrom }}
31+
{{- if .Values.pgstacBootstrap.settings.extraEnvFrom }}
3232
envFrom:
3333
{{- with .Values.pgstacBootstrap.settings.extraEnvFrom }}
3434
{{- toYaml . | nindent 12 }}
@@ -39,8 +39,9 @@ spec:
3939
value: {{ .Values.pgstacBootstrap.settings.envVars.LOAD_FIXTURES | quote }}
4040
- name: KEEP_ALIVE
4141
value: {{ .Values.pgstacBootstrap.settings.envVars.KEEP_ALIVE | quote }}
42-
{{- with .Values.pgstacBootstrap.settings.extraEnvVars }}
43-
{{- toYaml . | nindent 12 }}
42+
{{- range $key, $value := .Values.pgstacBootstrap.settings.extraEnvVars }}
43+
- name: {{ $key | quote }}
44+
value: {{ $value | quote }}
4445
{{- end }}
4546
# TODO (emmanuel): to be removed when we have a generic way to
4647
# inject secrets in the pod

values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ stac:
1818
settings:
1919
labels:
2020
azure.workload.identity/use: "true"
21-
envVars:
21+
extraEnvVars:
2222
FORWARDED_ALLOW_IPS: "*"
2323
PROXY_HEADERS: True
2424
POSTGRES_USER: postgres
@@ -63,7 +63,7 @@ pgstacBootstrap:
6363
settings:
6464
labels:
6565
azure.workload.identity/use: "true"
66-
envVars:
66+
extraEnvVars:
6767
POSTGRES_USER: postgres
6868
POSTGRES_PORT: 5432
6969
postgrescluster:

0 commit comments

Comments
 (0)