Refactoring init-containers
This commit is contained in:
parent
c0588c16d4
commit
9adb0f9670
3
keystone/templates/_helpers.tpl
Normal file
3
keystone/templates/_helpers.tpl
Normal file
@ -0,0 +1,3 @@
|
||||
{{- define "joinListWithColon" -}}
|
||||
{{ range $k, $v := . }}{{ if $k }},{{ end }}{{ $v }}{{ end }}
|
||||
{{- end -}}
|
@ -17,11 +17,11 @@ spec:
|
||||
},
|
||||
{
|
||||
"name": "DEPENDENCY_SERVICE",
|
||||
"value": "mariadb"
|
||||
"value": "{{ include "joinListWithColon" .Values.dependencies.db_sync.service }}"
|
||||
},
|
||||
{
|
||||
"name": "DEPENDENCY_JOBS",
|
||||
"value": "mariadb-seed,keystone-init"
|
||||
"value": "{{ include "joinListWithColon" .Values.dependencies.db_sync.jobs }}"
|
||||
},
|
||||
{
|
||||
"name": "COMMAND",
|
||||
|
@ -20,15 +20,11 @@ spec:
|
||||
},
|
||||
{
|
||||
"name": "DEPENDENCY_SERVICE",
|
||||
"value": "mariadb,rabbitmq"
|
||||
"value": "{{ include "joinListWithColon" .Values.dependencies.api.service }}"
|
||||
},
|
||||
{
|
||||
"name": "DEPENDENCY_JOBS",
|
||||
"value": "mariadb-seed"
|
||||
},
|
||||
{
|
||||
"name": "DEPENDENCY_CONFIG",
|
||||
"value": "/etc/apache2/conf-enabled/wsgi-keystone.conf"
|
||||
"value": "{{ include "joinListWithColon" .Values.dependencies.api.jobs }}"
|
||||
},
|
||||
{
|
||||
"name": "COMMAND",
|
||||
|
@ -17,11 +17,11 @@ spec:
|
||||
},
|
||||
{
|
||||
"name": "DEPENDENCY_SERVICE",
|
||||
"value": "mariadb"
|
||||
"value": "{{ include "joinListWithColon" .Values.dependencies.init.service }}"
|
||||
},
|
||||
{
|
||||
"name": "DEPENDENCY_JOBS",
|
||||
"value": "mariadb-seed"
|
||||
"value": "{{ include "joinListWithColon" .Values.dependencies.init.jobs }}"
|
||||
},
|
||||
{
|
||||
"name": "COMMAND",
|
||||
@ -36,6 +36,9 @@ spec:
|
||||
- name: keystone-init
|
||||
image: {{ .Values.images.init }}
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
- bash
|
||||
- /tmp/init.sh
|
||||
volumeMounts:
|
||||
- name: initsh
|
||||
mountPath: /tmp/init.sh
|
||||
|
@ -39,3 +39,22 @@ database:
|
||||
misc:
|
||||
workers: 8
|
||||
debug: false
|
||||
|
||||
dependencies:
|
||||
api:
|
||||
jobs:
|
||||
- mariadb-seed
|
||||
- keystone-init
|
||||
service:
|
||||
- mariadb
|
||||
db_sync:
|
||||
jobs:
|
||||
- keystone-init
|
||||
- mariadb-seed
|
||||
service:
|
||||
- mariadb
|
||||
init:
|
||||
jobs:
|
||||
- mariadb-seed
|
||||
service:
|
||||
- mariadb
|
||||
|
Loading…
Reference in New Issue
Block a user