apiVersion: batch/v1 kind: Job metadata: name: glance-init spec: template: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ { "name": "init", "image": "quay.io/stackanetes/kubernetes-entrypoint:v0.1.0", "imagePullPolicy": "{{ .Values.images.pull_policy }}", "env": [ { "name": "NAMESPACE", "value": "{{ .Release.Namespace }}" }, { "name": "DEPENDENCY_SERVICE", "value": "{{ include "joinListWithColon" .Values.dependencies.init.service }}" }, { "name": "DEPENDENCY_JOBS", "value": "{{ include "joinListWithColon" .Values.dependencies.init.jobs }}" }, { "name": "COMMAND", "value": "echo done" } ] } ]' spec: restartPolicy: OnFailure nodeSelector: {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} containers: - name: glance-init image: {{ .Values.images.init }} imagePullPolicy: {{ .Values.images.pull_policy }} env: - name: ANSIBLE_LIBRARY value: /usr/share/ansible/ command: - bash - /tmp/init.sh volumeMounts: - name: initsh mountPath: /tmp/init.sh subPath: init.sh volumes: - name: initsh configMap: name: glance-bin