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 }}
|
||||
ks-user.sh: |+
|
||||
{{- 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 }}
|
||||
{{- end }}
|
||||
command:
|
||||
- cinder-api
|
||||
- --config-dir
|
||||
- /etc/cinder/conf
|
||||
- bash
|
||||
- /tmp/cinder-api.sh
|
||||
ports:
|
||||
- name: c-api
|
||||
containerPort: {{ .Values.network.api.port }}
|
||||
@ -69,8 +68,12 @@ spec:
|
||||
mountPath: /etc/cinder
|
||||
- name: pod-var-cache-cinder
|
||||
mountPath: /var/cache/cinder
|
||||
- name: cinder-bin
|
||||
mountPath: /tmp/cinder-api.sh
|
||||
subPath: cinder-api.sh
|
||||
readOnly: true
|
||||
- name: cinder-etc
|
||||
mountPath: /etc/cinder/conf/cinder.conf
|
||||
mountPath: /etc/cinder/cinder.conf
|
||||
subPath: cinder.conf
|
||||
readOnly: true
|
||||
- name: cinder-etc
|
||||
@ -86,6 +89,9 @@ spec:
|
||||
emptyDir: {}
|
||||
- name: pod-var-cache-cinder
|
||||
emptyDir: {}
|
||||
- name: cinder-bin
|
||||
configMap:
|
||||
name: cinder-bin
|
||||
- name: cinder-etc
|
||||
configMap:
|
||||
name: cinder-etc
|
||||
|
@ -55,16 +55,19 @@ spec:
|
||||
cpu: {{ .Values.resources.cinder_scheduler.limits.cpu | quote }}
|
||||
{{- end }}
|
||||
command:
|
||||
- cinder-scheduler
|
||||
- --config-dir
|
||||
- /etc/cinder/conf
|
||||
- bash
|
||||
- /tmp/cinder-scheduler.sh
|
||||
volumeMounts:
|
||||
- name: pod-etc-cinder
|
||||
mountPath: /etc/cinder
|
||||
- name: pod-var-cache-cinder
|
||||
mountPath: /var/cache/cinder
|
||||
- name: cinder-bin
|
||||
mountPath: /tmp/cinder-scheduler.sh
|
||||
subPath: cinder-scheduler.sh
|
||||
readOnly: true
|
||||
- name: cinder-etc
|
||||
mountPath: /etc/cinder/conf/cinder.conf
|
||||
mountPath: /etc/cinder/cinder.conf
|
||||
subPath: cinder.conf
|
||||
readOnly: true
|
||||
- name: cinder-etc
|
||||
@ -80,6 +83,9 @@ spec:
|
||||
emptyDir: {}
|
||||
- name: pod-var-cache-cinder
|
||||
emptyDir: {}
|
||||
- name: cinder-bin
|
||||
configMap:
|
||||
name: cinder-bin
|
||||
- name: cinder-etc
|
||||
configMap:
|
||||
name: cinder-etc
|
||||
|
@ -55,16 +55,19 @@ spec:
|
||||
cpu: {{ .Values.resources.cinder_volume.limits.cpu | quote }}
|
||||
{{- end }}
|
||||
command:
|
||||
- cinder-volume
|
||||
- --config-dir
|
||||
- /etc/cinder/conf
|
||||
- bash
|
||||
- /tmp/cinder-volume.sh
|
||||
volumeMounts:
|
||||
- name: pod-etc-cinder
|
||||
mountPath: /etc/cinder
|
||||
- name: pod-var-cache-cinder
|
||||
mountPath: /var/cache/cinder
|
||||
- name: cinder-bin
|
||||
mountPath: /tmp/cinder-volume.sh
|
||||
subPath: cinder-volume.sh
|
||||
readOnly: true
|
||||
- name: cinder-etc
|
||||
mountPath: /etc/cinder/conf/cinder.conf
|
||||
mountPath: /etc/cinder/cinder.conf
|
||||
subPath: cinder.conf
|
||||
readOnly: true
|
||||
- name: cinder-etc
|
||||
@ -80,6 +83,9 @@ spec:
|
||||
emptyDir: {}
|
||||
- name: pod-var-cache-cinder
|
||||
emptyDir: {}
|
||||
- name: cinder-bin
|
||||
configMap:
|
||||
name: cinder-bin
|
||||
- name: cinder-etc
|
||||
configMap:
|
||||
name: cinder-etc
|
||||
|
Loading…
x
Reference in New Issue
Block a user