385a8a099e
* start.sh was added back, which had requiring sourcing * the naming convention for charts is finalized with this example landing on configmap-*.yaml to satisfy those of us with OCD * imagePullPolicies added for init-containers, required by helm 2.1.0 which does not supply them by default
51 lines
1.4 KiB
YAML
51 lines
1.4 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 }}",
|
|
"imagePullPolicy": "{{ .Values.images.pull_policy }}",
|
|
"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: {{ .Values.images.pull_policy }}
|
|
command:
|
|
- bash
|
|
- /tmp/init.sh
|
|
volumeMounts:
|
|
- name: keystone-bin
|
|
mountPath: /tmp/init.sh
|
|
subPath: init.sh
|
|
volumes:
|
|
- name: keystone-bin
|
|
configMap:
|
|
name: keystone-bin
|