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:
Pete Birley 2017-05-31 09:27:48 -05:00
parent 5f3bb7674e
commit c0651f3e22
5 changed files with 62 additions and 8 deletions

View 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

View 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

View File

@ -27,5 +27,9 @@ data:
{{- include "helm-toolkit.scripts.keystone_endpoints" . | indent 4 }}
ks-user.sh: |+
{{- 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: |+
{{ tuple "bin/_bootstrap.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}

View File

@ -57,9 +57,8 @@ spec:
memory: {{ .Values.resources.api.requests.memory | quote }}
{{- end }}
command:
- glance-api
- --config-file
- /etc/glance/glance-api.conf
- bash
- /tmp/glance-api.sh
ports:
- containerPort: {{ .Values.conf.glance.default.glance.api.bind_port }}
readinessProbe:
@ -68,6 +67,10 @@ spec:
volumeMounts:
- name: etcglance
mountPath: /etc/glance
- name: glance-bin
mountPath: /tmp/glance-api.sh
subPath: glance-api.sh
readOnly: true
- name: glance-etc
mountPath: /etc/glance/glance-api.conf
subPath: glance-api.conf
@ -95,6 +98,11 @@ spec:
{{- end }}
{{ if $mounts_glance_api.volumeMounts }}{{ toYaml $mounts_glance_api.volumeMounts | indent 12 }}{{ end }}
volumes:
- name: etcglance
emptyDir: {}
- name: glance-bin
configMap:
name: glance-bin
- name: glance-etc
configMap:
name: glance-etc
@ -103,6 +111,4 @@ spec:
persistentVolumeClaim:
claimName: glance-images
{{- end }}
- name: etcglance
emptyDir: {}
{{ if $mounts_glance_api.volumes }}{{ toYaml $mounts_glance_api.volumes | indent 8 }}{{ end }}

View File

@ -49,9 +49,8 @@ spec:
memory: {{ .Values.resources.registry.requests.memory | quote }}
{{- end }}
command:
- glance-registry
- --config-file
- /etc/glance/glance-registry.conf
- bash
- /tmp/glance-registry.sh
ports:
- containerPort: {{ .Values.conf.glance_registry.default.glance.registry.bind_port }}
readinessProbe:
@ -60,6 +59,10 @@ spec:
volumeMounts:
- name: etcglance
mountPath: /etc/glance
- name: glance-bin
mountPath: /tmp/glance-registry.sh
subPath: glance-registry.sh
readOnly: true
- name: glance-etc
mountPath: /etc/glance/glance-registry.conf
subPath: glance-registry.conf
@ -76,6 +79,9 @@ spec:
volumes:
- name: etcglance
emptyDir: {}
- name: glance-bin
configMap:
name: glance-bin
- name: glance-etc
configMap:
name: glance-etc