44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: keystone-db-sync
|
|
spec:
|
|
template:
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: keystone-init
|
|
image: {{ .Values.global.deployment.image.db_sync }}
|
|
imagePullPolicy: Always
|
|
env:
|
|
- name: INTERFACE_NAME
|
|
value: "eth0"
|
|
- name: POD_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.name
|
|
- name: NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
- name: COMMAND
|
|
value: "bash /tmp/db-sync.sh"
|
|
- name: DEPENDENCY_JOBS
|
|
value: "keystone-init,mariadb-seed"
|
|
- name: DEPENDENCY_SERVICE
|
|
value: "mariadb"
|
|
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
|