6f124d5107
According to #101 Signed-off-by: DTadrzak <daniel.tadrzak@intel.com>
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: glance-db-sync
|
|
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.db_sync.service }}"
|
|
},
|
|
{
|
|
"name": "DEPENDENCY_JOBS",
|
|
"value": "{{ include "joinListWithColon" .Values.dependencies.db_sync.jobs }}"
|
|
},
|
|
{
|
|
"name": "COMMAND",
|
|
"value": "echo done"
|
|
}
|
|
]
|
|
}
|
|
]'
|
|
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:
|
|
- bash
|
|
- /tmp/db-sync.sh
|
|
volumeMounts:
|
|
- name: glanceapiconf
|
|
mountPath: /etc/glance/glance-api.conf
|
|
subPath: glance-api.conf
|
|
- name: dbsyncsh
|
|
mountPath: /tmp/db-sync.sh
|
|
subPath: db-sync.sh
|
|
volumes:
|
|
- name: glanceapiconf
|
|
configMap:
|
|
name: glance-glanceapiconf
|
|
- name: dbsyncsh
|
|
configMap:
|
|
name: glance-dbsyncsh
|