Skip to content

Commit

Permalink
fix!: separate init image definitions for nats and redis
Browse files Browse the repository at this point in the history
  • Loading branch information
Wielewout committed Dec 15, 2023
1 parent 0669a5e commit bad42ef
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions charts/common/templates/_init.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@
{{- $values := get . "values" | default $.Values -}}

{{- $name := get . "name" | required "Name needs to be provided to common init container args" -}}
{{- $initImage := $values.initImage | required "Init image needs to be provided as part of the values to common init container args" -}}
{{- $command := get . "command" -}}

containerName: {{ $name | quote }}
image:
{{- $initImage | toYaml | nindent 2 }}

{{- with $command }}
command:
Expand All @@ -55,11 +52,17 @@ Init container check waiting until redis is available
{{- $values := get . "values" | default $.Values -}}

{{- $bootstrapConfigMapName := get . "bootstrapConfigMapName" | default (include "accelleran.common.bootstrap.configMapName" .) -}}
{{- $image := ($values.initImage).redis | required "The redis init image needs to be provided to common init redis args" -}}

top:
{{ $ | toYaml | nindent 2 }}
values:
{{ $values | toYaml | nindent 2 }}
{{
(mergeOverwrite
(deepCopy $values)
(dict "image" $image)
) | toYaml | nindent 2
}}

name: check-redis
command:
Expand Down Expand Up @@ -101,11 +104,18 @@ Init container check waiting until NATS is available
{{- $values := get . "values" | default $.Values -}}

{{- $bootstrapConfigMapName := get . "bootstrapConfigMapName" | default (include "accelleran.common.bootstrap.configMapName" .) -}}
{{- $image := ($values.initImage).nats | required "The nats init image needs to be provided to common init nats args" -}}

top:
{{ $ | toYaml | nindent 2 }}
values:
{{ $values | toYaml | nindent 2 }}
{{
(mergeOverwrite
(deepCopy $values)
(dict "image" $image)
) | toYaml | nindent 2
}}


name: check-nats
command:
Expand Down

0 comments on commit bad42ef

Please sign in to comment.