diff --git a/charts/sourcegraph-migrator/templates/migrator/sourcegraph-migrator.Job.yaml b/charts/sourcegraph-migrator/templates/migrator/sourcegraph-migrator.Job.yaml index 9c06be82..1e470a34 100644 --- a/charts/sourcegraph-migrator/templates/migrator/sourcegraph-migrator.Job.yaml +++ b/charts/sourcegraph-migrator/templates/migrator/sourcegraph-migrator.Job.yaml @@ -40,9 +40,11 @@ spec: imagePullPolicy: {{ .Values.sourcegraph.image.pullPolicy }} args: {{- default (list "up") .Values.migrator.args | toYaml | nindent 8 }} env: + {{- if not .Values.migrator.databaseAuthOverrideEnvVars }} {{- include "sourcegraph.databaseAuth" (list . "pgsql" "PG") | nindent 8 }} {{- include "sourcegraph.databaseAuth" (list . "codeIntelDB" "CODEINTEL_PG") | nindent 8 }} {{- include "sourcegraph.databaseAuth" (list . "codeInsightsDB" "CODEINSIGHTS_PG") | nindent 8 }} + {{- end }} {{- range $name, $item := .Values.migrator.env }} - name: {{ $name }} {{- $item | toYaml | nindent 10 }}