50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: keystone-init
|
|
spec:
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
pod.beta.kubernetes.io/init-containers: '[
|
|
{
|
|
"name": "init",
|
|
"image": "{{ .Values.images.entrypoint }}",
|
|
"env": [
|
|
{
|
|
"name": "NAMESPACE",
|
|
"value": "{{ .Release.Namespace }}"
|
|
},
|
|
{
|
|
"name": "DEPENDENCY_SERVICE",
|
|
"value": "{{ include "joinListWithColon" .Values.dependencies.init.service }}"
|
|
},
|
|
{
|
|
"name": "DEPENDENCY_JOBS",
|
|
"value": "{{ include "joinListWithColon" .Values.dependencies.init.jobs }}"
|
|
},
|
|
{
|
|
"name": "COMMAND",
|
|
"value": "echo done"
|
|
}
|
|
]
|
|
}
|
|
]'
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: keystone-init
|
|
image: {{ .Values.images.init }}
|
|
imagePullPolicy: Always
|
|
command:
|
|
- bash
|
|
- /tmp/init.sh
|
|
volumeMounts:
|
|
- name: keystone-bin
|
|
mountPath: /tmp/init.sh
|
|
subPath: init.sh
|
|
volumes:
|
|
- name: keystone-bin
|
|
configMap:
|
|
name: keystone-bin
|