bdac1be107
This is an effort to implement helm charts for ranger component Included integration changes needed in ranger-agent Signed-off-by: Hari Om Singh<hosingh000@gmail.com> Change-Id: I27911d134882365a29b7ffcf1f7ab2e38cf717be
60 lines
2.1 KiB
YAML
Executable File
60 lines
2.1 KiB
YAML
Executable File
{{/*
|
|
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.
|
|
*/}}
|
|
|
|
{{- if .Values.manifests.pod_test }}
|
|
{{- $envAll := . }}
|
|
|
|
{{- $mounts_tests := .Values.pod.mounts.ranger_tests.ranger_tests }}
|
|
{{- $mounts_tests_init := .Values.pod.mounts.ranger_tests.init_container }}
|
|
|
|
{{- $serviceAccountName := print $envAll.Release.Name "-test" }}
|
|
{{ tuple $envAll "tests" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: "{{$envAll.Release.Name}}-test"
|
|
annotations:
|
|
"helm.sh/hook": test-success
|
|
spec:
|
|
serviceAccountName: {{ $serviceAccountName }}
|
|
nodeSelector:
|
|
{{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }}
|
|
restartPolicy: Never
|
|
initContainers:
|
|
{{ tuple $envAll "tests" $mounts_tests_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 4 }}
|
|
containers:
|
|
- name: {{.Release.Name}}-test
|
|
image: {{ .Values.images.tags.scripted_test }}
|
|
env:
|
|
- name: RANGER_SERVICE_URL
|
|
value: {{ tuple "cms" "public" "api" . | include "helm-toolkit.endpoints.keystone_endpoint_uri_lookup" }}
|
|
command:
|
|
- /tmp/ranger-test.sh
|
|
volumeMounts:
|
|
- name: ranger-bin
|
|
mountPath: /tmp/ranger-test.sh
|
|
subPath: ranger-test.sh
|
|
readOnly: true
|
|
{{ if $mounts_tests.volumeMounts }}{{ toYaml $mounts_tests.volumeMounts | indent 8 }}{{ end }}
|
|
volumes:
|
|
- name: ranger-bin
|
|
configMap:
|
|
name: ranger-bin
|
|
defaultMode: 0555
|
|
{{ if $mounts_tests.volumes }}{{ toYaml $mounts_tests.volumes | indent 4 }}{{ end }}
|
|
{{- end }}
|