393ed4cf47
Due to some messy rebases and a botched git history, implemented all changes into one PR
56 lines
1.6 KiB
YAML
56 lines
1.6 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: glance-post
|
|
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.post.service }}"
|
|
},
|
|
{
|
|
"name": "DEPENDENCY_JOBS",
|
|
"value": "{{ include "joinListWithColon" .Values.dependencies.post.jobs }}"
|
|
},
|
|
{
|
|
"name": "COMMAND",
|
|
"value": "echo done"
|
|
}
|
|
]
|
|
}
|
|
]'
|
|
spec:
|
|
nodeSelector:
|
|
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: glance-post
|
|
image: {{ .Values.images.post }}
|
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
|
command:
|
|
- bash
|
|
- /tmp/post.sh
|
|
volumeMounts:
|
|
- name: postsh
|
|
mountPath: /tmp/post.sh
|
|
subPath: post.sh
|
|
env:
|
|
- name: ANSIBLE_LIBRARY
|
|
value: /usr/share/ansible/
|
|
volumes:
|
|
- name: postsh
|
|
configMap:
|
|
name: glance-bin
|