9944b0d84f
This PS adds RBAC rules for all remaining helm test pods in OpenStack-Helm. Change-Id: Ib44d5fdc8c147f2cbecec51cc4767116f3adb6b2
51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
{{/*
|
|
Copyright 2017 The Openstack-Helm Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/}}
|
|
|
|
{{- $envAll := . }}
|
|
{{- $dependencies := .Values.dependencies.tests }}
|
|
|
|
{{- $serviceAccountName := print .Release.Name "-test" }}
|
|
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: "{{.Release.Name}}-test"
|
|
annotations:
|
|
"helm.sh/hook": test-success
|
|
spec:
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: {{.Release.Name}}-congress-test
|
|
image: {{ .Values.images.tags.congress_scripted_test }}
|
|
env:
|
|
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
|
|
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 8 }}
|
|
{{- end }}
|
|
command:
|
|
- /tmp/congress-test.sh
|
|
volumeMounts:
|
|
- name: congress-bin
|
|
mountPath: /tmp/congress-test.sh
|
|
subPath: congress-test.sh
|
|
readOnly: true
|
|
volumes:
|
|
- name: congress-bin
|
|
configMap:
|
|
name: congress-bin
|
|
defaultMode: 0555
|