{{- $envAll := . }} {{- $dependencies := .Values.dependencies.init }} apiVersion: batch/v1 kind: Job metadata: name: glance-db-init spec: template: metadata: annotations: pod.beta.kubernetes.io/init-containers: '[ {{ tuple $envAll $dependencies | include "dep_check_init_cont" | indent 10 }} ]' spec: restartPolicy: OnFailure nodeSelector: {{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }} containers: - name: glance-db-init image: {{ .Values.images.db_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