diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl index 46dc4a878d..65c2a491a3 100644 --- a/chart/templates/_helpers.tpl +++ b/chart/templates/_helpers.tpl @@ -45,6 +45,15 @@ Return the proper Marquez web image name {{- include "common.images.image" (dict "imageRoot" .Values.web.image "global" .Values.global) -}} {{- end -}} +{{/* +Return the proper Postgresql image name for the wait-for-db initContainer +*/}} +{{- define "marquez.wait-for-db.image" -}} +{{- if .Values.postgresql.enabled -}} + {{- include "common.images.image" (dict "imageRoot" .Values.postgresql.image "global" .Values.global) -}} +{{- end -}} +{{- end -}} + {{/* Get the secret name */}} diff --git a/chart/templates/marquez/deployment.yaml b/chart/templates/marquez/deployment.yaml index 2a03342f92..737efafac3 100644 --- a/chart/templates/marquez/deployment.yaml +++ b/chart/templates/marquez/deployment.yaml @@ -28,7 +28,7 @@ spec: # This init container is for avoiding CrashLoopback errors in the Marquez container because the PostgreSQL container is not ready initContainers: - name: wait-for-db - image: postgres:12.1 + image: {{ include "marquez.wait-for-db.image" . }} imagePullPolicy: IfNotPresent command: - /bin/bash