Merge "RabbitMQ: fix dependency checks for tests and wait job"

This commit is contained in:
Zuul 2019-03-22 20:45:24 +00:00 committed by Gerrit Code Review
commit 2aea1e4fe8
3 changed files with 11 additions and 1 deletions

View File

@ -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 }}

View File

@ -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" }}
---

View File

@ -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