diff --git a/rabbitmq/templates/job-cluster-wait.yaml b/rabbitmq/templates/job-cluster-wait.yaml index a29bde26e..fe91b2d68 100644 --- a/rabbitmq/templates/job-cluster-wait.yaml +++ b/rabbitmq/templates/job-cluster-wait.yaml @@ -39,7 +39,7 @@ spec: nodeSelector: {{ $envAll.Values.labels.jobs.node_selector_key }}: {{ $envAll.Values.labels.test.node_selector_value | quote }} initContainers: -{{ tuple $envAll "tests" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} +{{ tuple $envAll "cluster_wait" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} containers: - name: {{.Release.Name}}-rabbitmq-cluster-wait {{ tuple $envAll "scripted_test" | include "helm-toolkit.snippets.image" | indent 10 }} diff --git a/rabbitmq/templates/pod-test.yaml b/rabbitmq/templates/pod-test.yaml index cc4bddcbb..ff45368fd 100644 --- a/rabbitmq/templates/pod-test.yaml +++ b/rabbitmq/templates/pod-test.yaml @@ -17,6 +17,12 @@ limitations under the License. {{- if .Values.manifests.pod_test }} {{- $envAll := . }} +{{ if kindIs "string" $envAll.Values.dependencies.static.tests.jobs }} +{{ if eq $envAll.Values.dependencies.static.tests.jobs "cluster_wait" }} +{{ $_ := set $envAll.Values.dependencies.static.tests "jobs" ( list ( print $envAll.Release.Name "-cluster-wait" ) ) }} +{{ end }} +{{ end }} + {{- $serviceAccountName := print .Release.Name "-test" }} {{ tuple $envAll "tests" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} --- diff --git a/rabbitmq/values.yaml b/rabbitmq/values.yaml index 83be120ed..bdc730ab0 100644 --- a/rabbitmq/values.yaml +++ b/rabbitmq/values.yaml @@ -155,6 +155,10 @@ dependencies: services: - endpoint: internal service: oslo_messaging + # NOTE (portdirect): this key is somewhat special, if set to the string + # `cluster_wait` then the job dep will be populated with a single value + # containing the generated name for the `cluster_wait` job name. + jobs: cluster_wait cluster_wait: services: - endpoint: internal