Skip to content

Commit 94da246

Browse files
terrpanmade-terrywslulciuc
authored
Dont use hardcoed postgres image for initcontainer (#2579)
Signed-off-by: daniel.terry <daniel.terry@madepeople.se> Co-authored-by: daniel.terry <daniel.terry@madepeople.se> Co-authored-by: Willy Lulciuc <willy@datakin.com>
1 parent 0322365 commit 94da246

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

chart/templates/_helpers.tpl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,15 @@ Return the proper Marquez web image name
4545
{{- include "common.images.image" (dict "imageRoot" .Values.web.image "global" .Values.global) -}}
4646
{{- end -}}
4747

48+
{{/*
49+
Return the proper Postgresql image name for the wait-for-db initContainer
50+
*/}}
51+
{{- define "marquez.wait-for-db.image" -}}
52+
{{- if .Values.postgresql.enabled -}}
53+
{{- include "common.images.image" (dict "imageRoot" .Values.postgresql.image "global" .Values.global) -}}
54+
{{- end -}}
55+
{{- end -}}
56+
4857
{{/*
4958
Get the secret name
5059
*/}}

chart/templates/marquez/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
# This init container is for avoiding CrashLoopback errors in the Marquez container because the PostgreSQL container is not ready
2929
initContainers:
3030
- name: wait-for-db
31-
image: postgres:12.1
31+
image: {{ include "marquez.wait-for-db.image" . }}
3232
imagePullPolicy: IfNotPresent
3333
command:
3434
- /bin/bash

0 commit comments

Comments
 (0)