Pete Birley 1a13f9ba83 Add support for daemonsets to the Kubernetes-Entrypoint init-container.
It also makes two other changes:

 * Moves the entrypoint container manifest snippet to its own file to reduce loading on the _funcs.tpl file
 * Changes dep-check-init-cont to dep_check_init_cont to match the formatting of other defines used in OpenStack Helm
2017-01-22 05:35:31 +00:00

36 lines
982 B
YAML

{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.post }}
apiVersion: batch/v1
kind: Job
metadata:
name: glance-post
spec:
template:
metadata:
annotations:
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }}
]'
spec:
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
restartPolicy: OnFailure
containers:
- name: glance-post
image: {{ .Values.images.post }}
imagePullPolicy: {{ .Values.images.pull_policy }}
command:
- bash
- /tmp/post.sh
volumeMounts:
- name: postsh
mountPath: /tmp/post.sh
subPath: post.sh
env:
- name: ANSIBLE_LIBRARY
value: /usr/share/ansible/
volumes:
- name: postsh
configMap:
name: glance-bin