openstack-helm/glance/templates/job-db-sync.yaml

33 lines
945 B
YAML

{{- $envAll := . }}
{{- $dependecies := .Values.dependencies.db_sync }}
apiVersion: batch/v1
kind: Job
metadata:
name: glance-db-sync
spec:
template:
metadata:
annotations:
pod.beta.kubernetes.io/init-containers: '[
{{ tuple $envAll $dependecies | 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-sync
image: {{ .Values.images.db_sync }}
imagePullPolicy: {{ .Values.images.pull_policy }}
command:
- glance-manage
- db_sync
volumeMounts:
- name: glanceapiconf
mountPath: /etc/glance/glance-api.conf
subPath: glance-api.conf
volumes:
- name: glanceapiconf
configMap:
name: glance-etc