-{{- $subchartDot := include "common.subChartDot" (dict "dot" $dot "initRoot" $initRoot) }}
-{{- $wait_for := default $dot.Values.wait_for .wait_for -}}
-- name: {{ include "common.name" $dot }}-{{ $wait_for.name }}-readiness
- image: "{{ $subchartDot.Values.global.readinessRepository }}/{{ $subchartDot.Values.global.readinessImage }}"
+{{- $subchartDot := fromJson (include "common.subChartDot" (dict "dot" $dot "initRoot" $initRoot)) }}
+{{- $wait_for := default $initRoot.wait_for .wait_for -}}
+{{- $containers := index (ternary (dict "containers" $wait_for) $wait_for (kindIs "slice" $wait_for)) "containers" -}}
+{{- $namePart := index (ternary (dict) $wait_for (kindIs "slice" $wait_for)) "name" -}}
+{{- $jobs := index (ternary (dict) $wait_for (kindIs "slice" $wait_for)) "jobs" -}}
+- name: {{ include "common.name" $dot }}{{ ternary "" (printf "-%s" $namePart) (empty $namePart) }}-readiness
+ image: {{ include "repositoryGenerator.image.readiness" $subchartDot }}