Skip to content

Commit

Permalink
Dont use hardcoed postgres image for initcontainer (#2579)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
3 people authored Aug 12, 2023
1 parent 0322365 commit 94da246
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/}}
Expand Down
2 changes: 1 addition & 1 deletion chart/templates/marquez/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 94da246

Please sign in to comment.