RBAC: add rules to all remaing helm test pods

This PS adds RBAC rules for all remaining helm test pods
in OpenStack-Helm.

Change-Id: Ib44d5fdc8c147f2cbecec51cc4767116f3adb6b2
This commit is contained in:
portdirect 2017-12-28 21:00:01 -05:00
parent 9fb2bdf839
commit 9944b0d84f
6 changed files with 29 additions and 0 deletions

View File

@ -16,8 +16,12 @@ limitations under the License.
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.tests }} {{- $dependencies := .Values.dependencies.tests }}
{{- $mounts_barbican_tests := .Values.pod.mounts.barbican_tests.barbican_tests }} {{- $mounts_barbican_tests := .Values.pod.mounts.barbican_tests.barbican_tests }}
{{- $mounts_barbican_tests_init := .Values.pod.mounts.barbican_tests.init_container }} {{- $mounts_barbican_tests_init := .Values.pod.mounts.barbican_tests.init_container }}
{{- $serviceAccountName := print .Release.Name "-test" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@ -26,6 +30,7 @@ metadata:
annotations: annotations:
"helm.sh/hook": test-success "helm.sh/hook": test-success
spec: spec:
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: Never restartPolicy: Never
initContainers: initContainers:
{{ tuple $envAll $dependencies $mounts_barbican_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ tuple $envAll $dependencies $mounts_barbican_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}

View File

@ -16,6 +16,9 @@ limitations under the License.
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.tests }} {{- $dependencies := .Values.dependencies.tests }}
{{- $serviceAccountName := print .Release.Name "-test" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@ -24,6 +27,7 @@ metadata:
annotations: annotations:
"helm.sh/hook": test-success "helm.sh/hook": test-success
spec: spec:
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: Never restartPolicy: Never
containers: containers:
- name: {{.Release.Name}}-congress-test - name: {{.Release.Name}}-congress-test

View File

@ -17,8 +17,12 @@ limitations under the License.
{{- if .Values.manifests.pod_rally_test }} {{- if .Values.manifests.pod_rally_test }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.tests }} {{- $dependencies := .Values.dependencies.tests }}
{{- $mounts_glance_tests := .Values.pod.mounts.glance_tests.glance_tests }} {{- $mounts_glance_tests := .Values.pod.mounts.glance_tests.glance_tests }}
{{- $mounts_glance_tests_init := .Values.pod.mounts.glance_tests.init_container }} {{- $mounts_glance_tests_init := .Values.pod.mounts.glance_tests.init_container }}
{{- $serviceAccountName := print .Release.Name "-test" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@ -27,6 +31,7 @@ metadata:
annotations: annotations:
"helm.sh/hook": test-success "helm.sh/hook": test-success
spec: spec:
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: Never restartPolicy: Never
initContainers: initContainers:
{{ tuple $envAll $dependencies $mounts_glance_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }} {{ tuple $envAll $dependencies $mounts_glance_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}

View File

@ -17,8 +17,12 @@ limitations under the License.
{{- if .Values.manifests.pod_rally_test }} {{- if .Values.manifests.pod_rally_test }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.tests }} {{- $dependencies := .Values.dependencies.tests }}
{{- $mounts_keystone_tests := .Values.pod.mounts.keystone_tests.keystone_tests }} {{- $mounts_keystone_tests := .Values.pod.mounts.keystone_tests.keystone_tests }}
{{- $mounts_keystone_tests_init := .Values.pod.mounts.keystone_tests.init_container }} {{- $mounts_keystone_tests_init := .Values.pod.mounts.keystone_tests.init_container }}
{{- $serviceAccountName := print .Release.Name "-test" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@ -27,6 +31,7 @@ metadata:
annotations: annotations:
"helm.sh/hook": test-success "helm.sh/hook": test-success
spec: spec:
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: Never restartPolicy: Never
initContainers: initContainers:
{{ tuple $envAll $dependencies $mounts_keystone_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }} {{ tuple $envAll $dependencies $mounts_keystone_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}

View File

@ -17,8 +17,12 @@ limitations under the License.
{{- if .Values.manifests.pod_rally_test }} {{- if .Values.manifests.pod_rally_test }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.tests }} {{- $dependencies := .Values.dependencies.tests }}
{{- $mounts_neutron_tests := .Values.pod.mounts.neutron_tests.neutron_tests }} {{- $mounts_neutron_tests := .Values.pod.mounts.neutron_tests.neutron_tests }}
{{- $mounts_neutron_tests_init := .Values.pod.mounts.neutron_tests.init_container }} {{- $mounts_neutron_tests_init := .Values.pod.mounts.neutron_tests.init_container }}
{{- $serviceAccountName := print .Release.Name "-test" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@ -27,6 +31,7 @@ metadata:
annotations: annotations:
"helm.sh/hook": test-success "helm.sh/hook": test-success
spec: spec:
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: Never restartPolicy: Never
initContainers: initContainers:
{{ tuple $envAll $dependencies $mounts_neutron_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }} {{ tuple $envAll $dependencies $mounts_neutron_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}

View File

@ -17,8 +17,12 @@ limitations under the License.
{{- if .Values.manifests.pod_rally_test }} {{- if .Values.manifests.pod_rally_test }}
{{- $envAll := . }} {{- $envAll := . }}
{{- $dependencies := .Values.dependencies.tests }} {{- $dependencies := .Values.dependencies.tests }}
{{- $mounts_nova_tests := .Values.pod.mounts.nova_tests.nova_tests }} {{- $mounts_nova_tests := .Values.pod.mounts.nova_tests.nova_tests }}
{{- $mounts_nova_tests_init := .Values.pod.mounts.nova_tests.init_container }} {{- $mounts_nova_tests_init := .Values.pod.mounts.nova_tests.init_container }}
{{- $serviceAccountName := print .Release.Name "-test" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
--- ---
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
@ -27,6 +31,7 @@ metadata:
annotations: annotations:
"helm.sh/hook": test-success "helm.sh/hook": test-success
spec: spec:
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: Never restartPolicy: Never
initContainers: initContainers:
{{ tuple $envAll $dependencies $mounts_nova_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }} {{ tuple $envAll $dependencies $mounts_nova_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}