Skip to content

Commit

Permalink
fix(helm): add missing env config on job (#11016)
Browse files Browse the repository at this point in the history
* fix(helm): add missing env config on job

The job isn't working well when using external database because the init container checking if the database is accessible isn't taking the same env values as the container that is initializing the database config

* fix(helm): remove unused env

* chore(helm): prefer using with over if
  • Loading branch information
leofvo authored Nov 12, 2024
1 parent 3598412 commit 912386b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions helm/defectdojo/templates/initializer-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ spec:
- secretRef:
name: {{ $fullName }}
optional: true
env:
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
{{- if .Values.cloudsql.enabled }}
- name: cloudsql-proxy
Expand Down Expand Up @@ -118,8 +122,8 @@ spec:
name: {{ .Values.postgresqlha.postgresql.existingSecret }}
key: postgresql-postgres-password
{{- end }}
{{- if .Values.extraEnv }}
{{- toYaml .Values.extraEnv | nindent 8 }}
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 8 }}
{{- end }}
resources:
{{- toYaml .Values.initializer.resources | nindent 10 }}
Expand Down

0 comments on commit 912386b

Please sign in to comment.