Consistency: Move Glance container start commands to scripts
This PS moves the container start commands to scripts. This brings the service into alignment with others in OpenStack-Helm, and enables easier debugging and modifcation of the launch commands for services. Change-Id: I433b5d94d3cfc8c9167a4f4ee75fb460a9c6bd9a
This commit is contained in:
parent
5f3bb7674e
commit
c0651f3e22
19
glance/templates/bin/_glance-api.sh.tpl
Normal file
19
glance/templates/bin/_glance-api.sh.tpl
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/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 -x
|
||||||
|
exec glance-api \
|
||||||
|
--config-file /etc/glance/glance-api.conf
|
19
glance/templates/bin/_glance-registry.sh.tpl
Normal file
19
glance/templates/bin/_glance-registry.sh.tpl
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/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 -x
|
||||||
|
exec glance-registry \
|
||||||
|
--config-file /etc/glance/glance-registry.conf
|
@ -27,5 +27,9 @@ data:
|
|||||||
{{- include "helm-toolkit.scripts.keystone_endpoints" . | indent 4 }}
|
{{- include "helm-toolkit.scripts.keystone_endpoints" . | indent 4 }}
|
||||||
ks-user.sh: |+
|
ks-user.sh: |+
|
||||||
{{- include "helm-toolkit.scripts.keystone_user" . | indent 4 }}
|
{{- include "helm-toolkit.scripts.keystone_user" . | indent 4 }}
|
||||||
|
glance-api.sh: |
|
||||||
|
{{ tuple "bin/_glance-api.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
glance-registry.sh: |
|
||||||
|
{{ tuple "bin/_glance-registry.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
bootstrap.sh: |+
|
bootstrap.sh: |+
|
||||||
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
@ -57,9 +57,8 @@ spec:
|
|||||||
memory: {{ .Values.resources.api.requests.memory | quote }}
|
memory: {{ .Values.resources.api.requests.memory | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- glance-api
|
- bash
|
||||||
- --config-file
|
- /tmp/glance-api.sh
|
||||||
- /etc/glance/glance-api.conf
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ .Values.conf.glance.default.glance.api.bind_port }}
|
- containerPort: {{ .Values.conf.glance.default.glance.api.bind_port }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
@ -68,6 +67,10 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: etcglance
|
- name: etcglance
|
||||||
mountPath: /etc/glance
|
mountPath: /etc/glance
|
||||||
|
- name: glance-bin
|
||||||
|
mountPath: /tmp/glance-api.sh
|
||||||
|
subPath: glance-api.sh
|
||||||
|
readOnly: true
|
||||||
- name: glance-etc
|
- name: glance-etc
|
||||||
mountPath: /etc/glance/glance-api.conf
|
mountPath: /etc/glance/glance-api.conf
|
||||||
subPath: glance-api.conf
|
subPath: glance-api.conf
|
||||||
@ -95,6 +98,11 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
{{ if $mounts_glance_api.volumeMounts }}{{ toYaml $mounts_glance_api.volumeMounts | indent 12 }}{{ end }}
|
{{ if $mounts_glance_api.volumeMounts }}{{ toYaml $mounts_glance_api.volumeMounts | indent 12 }}{{ end }}
|
||||||
volumes:
|
volumes:
|
||||||
|
- name: etcglance
|
||||||
|
emptyDir: {}
|
||||||
|
- name: glance-bin
|
||||||
|
configMap:
|
||||||
|
name: glance-bin
|
||||||
- name: glance-etc
|
- name: glance-etc
|
||||||
configMap:
|
configMap:
|
||||||
name: glance-etc
|
name: glance-etc
|
||||||
@ -103,6 +111,4 @@ spec:
|
|||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: glance-images
|
claimName: glance-images
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- name: etcglance
|
|
||||||
emptyDir: {}
|
|
||||||
{{ if $mounts_glance_api.volumes }}{{ toYaml $mounts_glance_api.volumes | indent 8 }}{{ end }}
|
{{ if $mounts_glance_api.volumes }}{{ toYaml $mounts_glance_api.volumes | indent 8 }}{{ end }}
|
||||||
|
@ -49,9 +49,8 @@ spec:
|
|||||||
memory: {{ .Values.resources.registry.requests.memory | quote }}
|
memory: {{ .Values.resources.registry.requests.memory | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- glance-registry
|
- bash
|
||||||
- --config-file
|
- /tmp/glance-registry.sh
|
||||||
- /etc/glance/glance-registry.conf
|
|
||||||
ports:
|
ports:
|
||||||
- containerPort: {{ .Values.conf.glance_registry.default.glance.registry.bind_port }}
|
- containerPort: {{ .Values.conf.glance_registry.default.glance.registry.bind_port }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
@ -60,6 +59,10 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: etcglance
|
- name: etcglance
|
||||||
mountPath: /etc/glance
|
mountPath: /etc/glance
|
||||||
|
- name: glance-bin
|
||||||
|
mountPath: /tmp/glance-registry.sh
|
||||||
|
subPath: glance-registry.sh
|
||||||
|
readOnly: true
|
||||||
- name: glance-etc
|
- name: glance-etc
|
||||||
mountPath: /etc/glance/glance-registry.conf
|
mountPath: /etc/glance/glance-registry.conf
|
||||||
subPath: glance-registry.conf
|
subPath: glance-registry.conf
|
||||||
@ -76,6 +79,9 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: etcglance
|
- name: etcglance
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
- name: glance-bin
|
||||||
|
configMap:
|
||||||
|
name: glance-bin
|
||||||
- name: glance-etc
|
- name: glance-etc
|
||||||
configMap:
|
configMap:
|
||||||
name: glance-etc
|
name: glance-etc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user