Consistency: Move Cinder container start commands to scripts
This PS moves the container start commands to scripts. This brings the service into alignment with other ones in OpenStack-Helm, and enables easier debugging and modifcation of the launch commands for services. Change-Id: Iff08c9fdaf34efeee3dea2c4b859b0a4e77bc9a9
This commit is contained in:
parent
a5420f4290
commit
5f3bb7674e
19
cinder/templates/bin/_cinder-api.sh.tpl
Normal file
19
cinder/templates/bin/_cinder-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 cinder-api \
|
||||||
|
--config-file /etc/cinder/cinder.conf
|
19
cinder/templates/bin/_cinder-scheduler.sh.tpl
Normal file
19
cinder/templates/bin/_cinder-scheduler.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 cinder-scheduler \
|
||||||
|
--config-file /etc/cinder/cinder.conf
|
19
cinder/templates/bin/_cinder-volume.sh.tpl
Normal file
19
cinder/templates/bin/_cinder-volume.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 cinder-volume \
|
||||||
|
--config-file /etc/cinder/cinder.conf
|
@ -27,3 +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 }}
|
||||||
|
cinder-api.sh: |
|
||||||
|
{{ tuple "bin/_cinder-api.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
cinder-scheduler.sh: |
|
||||||
|
{{ tuple "bin/_cinder-scheduler.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
cinder-volume.sh: |
|
||||||
|
{{ tuple "bin/_cinder-volume.sh.tpl" . | include "helm-toolkit.utils.template" | indent 4 }}
|
||||||
|
@ -55,9 +55,8 @@ spec:
|
|||||||
cpu: {{ .Values.resources.cinder_api.limits.cpu | quote }}
|
cpu: {{ .Values.resources.cinder_api.limits.cpu | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- cinder-api
|
- bash
|
||||||
- --config-dir
|
- /tmp/cinder-api.sh
|
||||||
- /etc/cinder/conf
|
|
||||||
ports:
|
ports:
|
||||||
- name: c-api
|
- name: c-api
|
||||||
containerPort: {{ .Values.network.api.port }}
|
containerPort: {{ .Values.network.api.port }}
|
||||||
@ -69,8 +68,12 @@ spec:
|
|||||||
mountPath: /etc/cinder
|
mountPath: /etc/cinder
|
||||||
- name: pod-var-cache-cinder
|
- name: pod-var-cache-cinder
|
||||||
mountPath: /var/cache/cinder
|
mountPath: /var/cache/cinder
|
||||||
|
- name: cinder-bin
|
||||||
|
mountPath: /tmp/cinder-api.sh
|
||||||
|
subPath: cinder-api.sh
|
||||||
|
readOnly: true
|
||||||
- name: cinder-etc
|
- name: cinder-etc
|
||||||
mountPath: /etc/cinder/conf/cinder.conf
|
mountPath: /etc/cinder/cinder.conf
|
||||||
subPath: cinder.conf
|
subPath: cinder.conf
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: cinder-etc
|
- name: cinder-etc
|
||||||
@ -86,6 +89,9 @@ spec:
|
|||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: pod-var-cache-cinder
|
- name: pod-var-cache-cinder
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
- name: cinder-bin
|
||||||
|
configMap:
|
||||||
|
name: cinder-bin
|
||||||
- name: cinder-etc
|
- name: cinder-etc
|
||||||
configMap:
|
configMap:
|
||||||
name: cinder-etc
|
name: cinder-etc
|
||||||
|
@ -55,16 +55,19 @@ spec:
|
|||||||
cpu: {{ .Values.resources.cinder_scheduler.limits.cpu | quote }}
|
cpu: {{ .Values.resources.cinder_scheduler.limits.cpu | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- cinder-scheduler
|
- bash
|
||||||
- --config-dir
|
- /tmp/cinder-scheduler.sh
|
||||||
- /etc/cinder/conf
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: pod-etc-cinder
|
- name: pod-etc-cinder
|
||||||
mountPath: /etc/cinder
|
mountPath: /etc/cinder
|
||||||
- name: pod-var-cache-cinder
|
- name: pod-var-cache-cinder
|
||||||
mountPath: /var/cache/cinder
|
mountPath: /var/cache/cinder
|
||||||
|
- name: cinder-bin
|
||||||
|
mountPath: /tmp/cinder-scheduler.sh
|
||||||
|
subPath: cinder-scheduler.sh
|
||||||
|
readOnly: true
|
||||||
- name: cinder-etc
|
- name: cinder-etc
|
||||||
mountPath: /etc/cinder/conf/cinder.conf
|
mountPath: /etc/cinder/cinder.conf
|
||||||
subPath: cinder.conf
|
subPath: cinder.conf
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: cinder-etc
|
- name: cinder-etc
|
||||||
@ -80,6 +83,9 @@ spec:
|
|||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: pod-var-cache-cinder
|
- name: pod-var-cache-cinder
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
- name: cinder-bin
|
||||||
|
configMap:
|
||||||
|
name: cinder-bin
|
||||||
- name: cinder-etc
|
- name: cinder-etc
|
||||||
configMap:
|
configMap:
|
||||||
name: cinder-etc
|
name: cinder-etc
|
||||||
|
@ -55,16 +55,19 @@ spec:
|
|||||||
cpu: {{ .Values.resources.cinder_volume.limits.cpu | quote }}
|
cpu: {{ .Values.resources.cinder_volume.limits.cpu | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
command:
|
command:
|
||||||
- cinder-volume
|
- bash
|
||||||
- --config-dir
|
- /tmp/cinder-volume.sh
|
||||||
- /etc/cinder/conf
|
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: pod-etc-cinder
|
- name: pod-etc-cinder
|
||||||
mountPath: /etc/cinder
|
mountPath: /etc/cinder
|
||||||
- name: pod-var-cache-cinder
|
- name: pod-var-cache-cinder
|
||||||
mountPath: /var/cache/cinder
|
mountPath: /var/cache/cinder
|
||||||
|
- name: cinder-bin
|
||||||
|
mountPath: /tmp/cinder-volume.sh
|
||||||
|
subPath: cinder-volume.sh
|
||||||
|
readOnly: true
|
||||||
- name: cinder-etc
|
- name: cinder-etc
|
||||||
mountPath: /etc/cinder/conf/cinder.conf
|
mountPath: /etc/cinder/cinder.conf
|
||||||
subPath: cinder.conf
|
subPath: cinder.conf
|
||||||
readOnly: true
|
readOnly: true
|
||||||
- name: cinder-etc
|
- name: cinder-etc
|
||||||
@ -80,6 +83,9 @@ spec:
|
|||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
- name: pod-var-cache-cinder
|
- name: pod-var-cache-cinder
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
- name: cinder-bin
|
||||||
|
configMap:
|
||||||
|
name: cinder-bin
|
||||||
- name: cinder-etc
|
- name: cinder-etc
|
||||||
configMap:
|
configMap:
|
||||||
name: cinder-etc
|
name: cinder-etc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user