Apply bootstrap framework to all remaining services
This PS applies the bootstrap framework to all remaining services. Change-Id: Ib77778d69e743b1594fbadaf9842e95541703bd1 External-Tracking-ID: OSH-36
This commit is contained in:
parent
20527cb57c
commit
3fe1fc3354
18
barbican/templates/bin/_bootstrap.sh.tpl
Normal file
18
barbican/templates/bin/_bootstrap.sh.tpl
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -ex
|
||||
{{ .Values.bootstrap.script | default "echo 'Not Enabled'" }}
|
@ -17,6 +17,10 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: barbican-bin
|
||||
data:
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
bootstrap.sh: |+
|
||||
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
db-init.py: |
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |
|
||||
|
56
barbican/templates/job-bootstrap.yaml
Normal file
56
barbican/templates/job-bootstrap.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
{{- $dependencies := .Values.dependencies.bootstrap }}
|
||||
{{- $mounts_barbican_bootstrap := .Values.mounts.barbican_bootstrap.barbican_bootstrap }}
|
||||
{{- $mounts_barbican_bootstrap_init := .Values.mounts.barbican_bootstrap.init_container }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: barbican-bootstrap
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
nodeSelector:
|
||||
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_barbican_bootstrap_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: barbican-bootstrap
|
||||
image: {{ .Values.images.bootstrap }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
env:
|
||||
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
|
||||
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- /tmp/bootstrap.sh
|
||||
volumeMounts:
|
||||
- name: barbican-bin
|
||||
mountPath: /tmp/bootstrap.sh
|
||||
subPath: bootstrap.sh
|
||||
readOnly: true
|
||||
{{- if $mounts_barbican_bootstrap.volumeMounts }}{{ toYaml $mounts_barbican_bootstrap.volumeMounts | indent 10 }}{{ end }}
|
||||
volumes:
|
||||
- name: barbican-bin
|
||||
configMap:
|
||||
name: barbican-bin
|
||||
defaultMode: 0555
|
||||
{{- if $mounts_barbican_bootstrap.volumes }}{{ toYaml $mounts_barbican_bootstrap.volumes | indent 6 }}{{ end }}
|
||||
{{- end }}
|
@ -17,6 +17,7 @@ labels:
|
||||
node_selector_value: enabled
|
||||
|
||||
images:
|
||||
bootstrap: docker.io/kolla/ubuntu-source-barbican-api:3.0.3
|
||||
dep_check: docker.io/kolla/ubuntu-source-kubernetes-entrypoint:4.0.0
|
||||
db_init: docker.io/kolla/ubuntu-source-barbican-api:3.0.3
|
||||
db_sync: docker.io/kolla/ubuntu-source-barbican-api:3.0.3
|
||||
@ -106,6 +107,11 @@ network:
|
||||
enabled: false
|
||||
port: 39486
|
||||
|
||||
bootstrap:
|
||||
enabled: false
|
||||
script: |
|
||||
openstack token issue
|
||||
|
||||
dependencies:
|
||||
db_init:
|
||||
services:
|
||||
@ -263,3 +269,6 @@ mounts:
|
||||
barbican_api:
|
||||
init_container: null
|
||||
barbican_api:
|
||||
barbican_bootstrap:
|
||||
init_container: null
|
||||
barbican_bootstrap:
|
||||
|
@ -19,7 +19,7 @@ kind: Deployment
|
||||
metadata:
|
||||
name: etcd
|
||||
spec:
|
||||
replicas: {{ .Values.resources.etcd.replicas }}
|
||||
replicas: {{ .Values.replicas.etcd }}
|
||||
{{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }}
|
||||
template:
|
||||
metadata:
|
||||
|
@ -39,6 +39,5 @@ pod:
|
||||
max_surge: 3
|
||||
max_unavailable: 1
|
||||
|
||||
resources:
|
||||
etcd:
|
||||
replicas: 1
|
||||
replicas:
|
||||
etcd: 1
|
||||
|
18
heat/templates/bin/_bootstrap.sh.tpl
Normal file
18
heat/templates/bin/_bootstrap.sh.tpl
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -ex
|
||||
{{ .Values.bootstrap.script | default "echo 'Not Enabled'" }}
|
@ -19,6 +19,10 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: heat-bin
|
||||
data:
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
bootstrap.sh: |+
|
||||
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
db-init.py: |
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |
|
||||
|
56
heat/templates/job-bootstrap.yaml
Normal file
56
heat/templates/job-bootstrap.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
{{- $dependencies := .Values.dependencies.bootstrap }}
|
||||
{{- $mounts_heat_bootstrap := .Values.mounts.heat_bootstrap.heat_bootstrap }}
|
||||
{{- $mounts_heat_bootstrap_init := .Values.mounts.heat_bootstrap.init_container }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: heat-bootstrap
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
nodeSelector:
|
||||
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_heat_bootstrap_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: heat-bootstrap
|
||||
image: {{ .Values.images.bootstrap }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
env:
|
||||
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
|
||||
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- /tmp/bootstrap.sh
|
||||
volumeMounts:
|
||||
- name: heat-bin
|
||||
mountPath: /tmp/bootstrap.sh
|
||||
subPath: bootstrap.sh
|
||||
readOnly: true
|
||||
{{- if $mounts_heat_bootstrap.volumeMounts }}{{ toYaml $mounts_heat_bootstrap.volumeMounts | indent 10 }}{{ end }}
|
||||
volumes:
|
||||
- name: heat-bin
|
||||
configMap:
|
||||
name: heat-bin
|
||||
defaultMode: 0555
|
||||
{{- if $mounts_heat_bootstrap.volumes }}{{ toYaml $mounts_heat_bootstrap.volumes | indent 6 }}{{ end }}
|
||||
{{- end }}
|
@ -29,6 +29,7 @@ labels:
|
||||
node_selector_value: enabled
|
||||
|
||||
images:
|
||||
bootstrap: docker.io/kolla/ubuntu-source-heat-api:3.0.3
|
||||
db_init: docker.io/kolla/ubuntu-source-heat-api:3.0.3
|
||||
db_sync: docker.io/kolla/ubuntu-source-heat-api:3.0.3
|
||||
ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3
|
||||
@ -122,6 +123,11 @@ network:
|
||||
enabled: false
|
||||
port: 30003
|
||||
|
||||
bootstrap:
|
||||
enabled: false
|
||||
script: |
|
||||
openstack token issue
|
||||
|
||||
dependencies:
|
||||
db_init:
|
||||
services:
|
||||
@ -442,3 +448,6 @@ mounts:
|
||||
heat_engine:
|
||||
init_container: null
|
||||
heat_engine:
|
||||
heat_bootstrap:
|
||||
init_container: null
|
||||
heat_bootstrap:
|
||||
|
18
magnum/templates/bin/_bootstrap.sh.tpl
Normal file
18
magnum/templates/bin/_bootstrap.sh.tpl
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -ex
|
||||
{{ .Values.bootstrap.script | default "echo 'Not Enabled'" }}
|
@ -19,6 +19,10 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: magnum-bin
|
||||
data:
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
bootstrap.sh: |+
|
||||
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
db-init.py: |
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |
|
||||
|
56
magnum/templates/job-bootstrap.yaml
Normal file
56
magnum/templates/job-bootstrap.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
{{- $dependencies := .Values.dependencies.bootstrap }}
|
||||
{{- $mounts_magnum_bootstrap := .Values.mounts.magnum_bootstrap.magnum_bootstrap }}
|
||||
{{- $mounts_magnum_bootstrap_init := .Values.mounts.magnum_bootstrap.init_container }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: magnum-bootstrap
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
nodeSelector:
|
||||
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_magnum_bootstrap_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: magnum-bootstrap
|
||||
image: {{ .Values.images.bootstrap }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
env:
|
||||
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
|
||||
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- /tmp/bootstrap.sh
|
||||
volumeMounts:
|
||||
- name: magnum-bin
|
||||
mountPath: /tmp/bootstrap.sh
|
||||
subPath: bootstrap.sh
|
||||
readOnly: true
|
||||
{{- if $mounts_magnum_bootstrap.volumeMounts }}{{ toYaml $mounts_magnum_bootstrap.volumeMounts | indent 10 }}{{ end }}
|
||||
volumes:
|
||||
- name: magnum-bin
|
||||
configMap:
|
||||
name: magnum-bin
|
||||
defaultMode: 0555
|
||||
{{- if $mounts_magnum_bootstrap.volumes }}{{ toYaml $mounts_magnum_bootstrap.volumes | indent 6 }}{{ end }}
|
||||
{{- end }}
|
@ -26,6 +26,7 @@ labels:
|
||||
node_selector_value: enabled
|
||||
|
||||
images:
|
||||
bootstrap: docker.io/kolla/ubuntu-source-magnum-api:3.0.3
|
||||
db_init: docker.io/kolla/ubuntu-source-magnum-api:3.0.3
|
||||
db_sync: docker.io/kolla/ubuntu-source-magnum-api:3.0.3
|
||||
ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3
|
||||
@ -64,6 +65,11 @@ network:
|
||||
enabled: false
|
||||
port: 30511
|
||||
|
||||
bootstrap:
|
||||
enabled: false
|
||||
script: |
|
||||
openstack token issue
|
||||
|
||||
dependencies:
|
||||
db_init:
|
||||
services:
|
||||
@ -292,3 +298,6 @@ mounts:
|
||||
magnum_conductor:
|
||||
init_container: null
|
||||
magnum_conductor:
|
||||
magnum_bootstrap:
|
||||
init_container: null
|
||||
magnum_bootstrap:
|
||||
|
18
mistral/templates/bin/_bootstrap.sh.tpl
Normal file
18
mistral/templates/bin/_bootstrap.sh.tpl
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -ex
|
||||
{{ .Values.bootstrap.script | default "echo 'Not Enabled'" }}
|
@ -19,6 +19,10 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: mistral-bin
|
||||
data:
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
bootstrap.sh: |+
|
||||
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
db-init.py: |+
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |+
|
||||
|
56
mistral/templates/job-bootstrap.yaml
Normal file
56
mistral/templates/job-bootstrap.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
{{- $dependencies := .Values.dependencies.bootstrap }}
|
||||
{{- $mounts_mistral_bootstrap := .Values.mounts.mistral_bootstrap.mistral_bootstrap }}
|
||||
{{- $mounts_mistral_bootstrap_init := .Values.mounts.mistral_bootstrap.init_container }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: mistral-bootstrap
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
nodeSelector:
|
||||
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_mistral_bootstrap_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: mistral-bootstrap
|
||||
image: {{ .Values.images.bootstrap }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
env:
|
||||
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
|
||||
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- /tmp/bootstrap.sh
|
||||
volumeMounts:
|
||||
- name: mistral-bin
|
||||
mountPath: /tmp/bootstrap.sh
|
||||
subPath: bootstrap.sh
|
||||
readOnly: true
|
||||
{{- if $mounts_mistral_bootstrap.volumeMounts }}{{ toYaml $mounts_mistral_bootstrap.volumeMounts | indent 10 }}{{ end }}
|
||||
volumes:
|
||||
- name: mistral-bin
|
||||
configMap:
|
||||
name: mistral-bin
|
||||
defaultMode: 0555
|
||||
{{- if $mounts_mistral_bootstrap.volumes }}{{ toYaml $mounts_mistral_bootstrap.volumes | indent 6 }}{{ end }}
|
||||
{{- end }}
|
@ -28,6 +28,7 @@ labels:
|
||||
node_selector_value: enabled
|
||||
|
||||
images:
|
||||
bootstrap: docker.io/kolla/ubuntu-source-mistral-api:3.0.3
|
||||
dep_check: docker.io/kolla/ubuntu-source-kubernetes-entrypoint:4.0.0
|
||||
db_init: docker.io/kolla/ubuntu-source-mistral-api:3.0.3
|
||||
db_sync: docker.io/kolla/ubuntu-source-mistral-api:3.0.3
|
||||
@ -48,6 +49,11 @@ network:
|
||||
enabled: false
|
||||
port: 28989
|
||||
|
||||
bootstrap:
|
||||
enabled: false
|
||||
script: |
|
||||
openstack token issue
|
||||
|
||||
dependencies:
|
||||
db_init:
|
||||
services:
|
||||
@ -220,6 +226,9 @@ mounts:
|
||||
mistral_event_engine:
|
||||
init_container: null
|
||||
mistral_event_engine:
|
||||
mistral_bootstrap:
|
||||
init_container: null
|
||||
mistral_bootstrap:
|
||||
|
||||
conf:
|
||||
policy:
|
||||
|
18
senlin/templates/bin/_bootstrap.sh.tpl
Normal file
18
senlin/templates/bin/_bootstrap.sh.tpl
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -ex
|
||||
{{ .Values.bootstrap.script | default "echo 'Not Enabled'" }}
|
@ -19,6 +19,10 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: senlin-bin
|
||||
data:
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
bootstrap.sh: |+
|
||||
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||
{{- end }}
|
||||
db-init.py: |
|
||||
{{- include "helm-toolkit.scripts.db_init" . | indent 4 }}
|
||||
db-sync.sh: |
|
||||
|
56
senlin/templates/job-bootstrap.yaml
Normal file
56
senlin/templates/job-bootstrap.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{{- $envAll := . }}
|
||||
{{- if .Values.bootstrap.enabled }}
|
||||
{{- $dependencies := .Values.dependencies.bootstrap }}
|
||||
{{- $mounts_senlin_bootstrap := .Values.mounts.senlin_bootstrap.senlin_bootstrap }}
|
||||
{{- $mounts_senlin_bootstrap_init := .Values.mounts.senlin_bootstrap.init_container }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: senlin-bootstrap
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
nodeSelector:
|
||||
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
||||
initContainers:
|
||||
{{ tuple $envAll $dependencies $mounts_senlin_bootstrap_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
|
||||
containers:
|
||||
- name: senlin-bootstrap
|
||||
image: {{ .Values.images.bootstrap }}
|
||||
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||
{{ tuple $envAll $envAll.Values.pod.resources.jobs.bootstrap | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||
env:
|
||||
{{- with $env := dict "ksUserSecret" .Values.secrets.identity.admin }}
|
||||
{{- include "helm-toolkit.snippets.keystone_openrc_env_vars" $env | indent 12 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- /tmp/bootstrap.sh
|
||||
volumeMounts:
|
||||
- name: senlin-bin
|
||||
mountPath: /tmp/bootstrap.sh
|
||||
subPath: bootstrap.sh
|
||||
readOnly: true
|
||||
{{- if $mounts_senlin_bootstrap.volumeMounts }}{{ toYaml $mounts_senlin_bootstrap.volumeMounts | indent 10 }}{{ end }}
|
||||
volumes:
|
||||
- name: senlin-bin
|
||||
configMap:
|
||||
name: senlin-bin
|
||||
defaultMode: 0555
|
||||
{{- if $mounts_senlin_bootstrap.volumes }}{{ toYaml $mounts_senlin_bootstrap.volumes | indent 6 }}{{ end }}
|
||||
{{- end }}
|
@ -26,6 +26,7 @@ labels:
|
||||
node_selector_value: enabled
|
||||
|
||||
images:
|
||||
bootstrap: docker.io/kolla/ubuntu-source-senlin-api:3.0.3
|
||||
db_init: docker.io/kolla/ubuntu-source-senlin-api:3.0.3
|
||||
db_sync: docker.io/kolla/ubuntu-source-senlin-api:3.0.3
|
||||
ks_user: docker.io/kolla/ubuntu-source-kolla-toolbox:3.0.3
|
||||
@ -64,6 +65,11 @@ network:
|
||||
enabled: false
|
||||
port: 30778
|
||||
|
||||
bootstrap:
|
||||
enabled: false
|
||||
script: |
|
||||
openstack token issue
|
||||
|
||||
dependencies:
|
||||
db_init:
|
||||
services:
|
||||
@ -292,3 +298,6 @@ mounts:
|
||||
senlin_engine:
|
||||
init_container: null
|
||||
senlin_engine:
|
||||
senlin_bootstrap:
|
||||
init_container: null
|
||||
senlin_bootstrap:
|
||||
|
Loading…
Reference in New Issue
Block a user