56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: keystone-db-sync
|
|
spec:
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
pod.beta.kubernetes.io/init-containers: '[
|
|
{
|
|
"name": "init",
|
|
"image": "quay.io/stackanetes/kubernetes-entrypoint:v0.1.0",
|
|
"env": [
|
|
{
|
|
"name": "NAMESPACE",
|
|
"value": "{{ .Release.Namespace }}"
|
|
},
|
|
{
|
|
"name": "DEPENDENCY_SERVICE",
|
|
"value": "mariadb"
|
|
},
|
|
{
|
|
"name": "DEPENDENCY_JOBS",
|
|
"value": "mariadb-seed,keystone-init"
|
|
},
|
|
{
|
|
"name": "COMMAND",
|
|
"value": "echo done"
|
|
}
|
|
]
|
|
}
|
|
]'
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: keystone-db-sync
|
|
image: {{ .Values.images.db_sync }}
|
|
imagePullPolicy: Always
|
|
command:
|
|
- bash
|
|
- /tmp/db-sync.sh
|
|
volumeMounts:
|
|
- name: keystoneconf
|
|
mountPath: /etc/keystone/keystone.conf
|
|
subPath: keystone.conf
|
|
- name: dbsyncsh
|
|
mountPath: /tmp/db-sync.sh
|
|
subPath: db-sync.sh
|
|
volumes:
|
|
- name: keystoneconf
|
|
configMap:
|
|
name: keystone-keystoneconf
|
|
- name: dbsyncsh
|
|
configMap:
|
|
name: keystone-dbsyncsh
|