Merge pull request #10 from PiotrProkop/keystone-fix

Switching jobs to init containers
This commit is contained in:
Brandon B. Jozsa 2016-11-24 10:12:17 -05:00 committed by GitHub
commit f96b434821
3 changed files with 52 additions and 1 deletions

View File

@ -4,12 +4,38 @@ 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": "DEPENDENCY_SERVICE",
"value": "mariadb"
},
{
"name": "DEPENDENCY_JOBS",
"value": "mariadb-seed,keystone-init"
},
{
"name": "COMMAND",
"value": "echo done"
}
]
}
]'
spec:
restartPolicy: OnFailure
containers:
- name: keystone-init
image: {{ .Values.global.deployment.image.db_sync }}
imagePullPolicy: Always
command:
- bash
- /tmp/db-sync.sh
env:
- name: INTERFACE_NAME
value: "eth0"

View File

@ -24,7 +24,7 @@ spec:
},
{
"name": "COMMAND",
"value": "echo Done"
"value": "echo done"
}
]
}
@ -35,6 +35,9 @@ spec:
containers:
- name: keystone-api
image: {{ .Values.global.deployment.image.api }}
command:
- bash
- /tmp/start.sh
env:
- name: INTERFACE_NAME
value: "eth0"

View File

@ -4,6 +4,28 @@ metadata:
name: keystone-init
spec:
template:
metadata:
annotations:
pod.beta.kubernetes.io/init-containers: '[
{
"name": "init",
"image": "quay.io/stackanetes/kubernetes-entrypoint:v0.1.0",
"env": [
{
"name": "DEPENDENCY_SERVICE",
"value": "mariadb"
},
{
"name": "DEPENDENCY_JOBS",
"value": "mariadb-seed,keystone-init"
},
{
"name": "COMMAND",
"value": "echo done"
}
]
}
]'
spec:
restartPolicy: OnFailure
containers: