Nova: Move ceph config to remain on host

Change-Id: I786f9fec553eb8b65faa5b8b022d6c971f7dfba1
Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
Pete Birley 2019-02-08 16:02:13 -06:00
parent 51463ddbc2
commit 65df9acaf8
2 changed files with 20 additions and 6 deletions

View File

@ -19,6 +19,8 @@ limitations under the License.
set -ex
export HOME=/tmp
cp -vf /etc/ceph/ceph.conf.template /etc/ceph/ceph.conf
KEYRING=/etc/ceph/ceph.client.${CEPH_CINDER_USER}.keyring
{{- if .Values.conf.ceph.cinder.keyring }}
cat > ${KEYRING} <<EOF

View File

@ -73,6 +73,18 @@ spec:
- name: pod-shared
mountPath: /tmp/pod-shared
{{- if .Values.conf.ceph.enabled }}
- name: ceph-perms
{{ tuple $envAll "nova_compute" | include "helm-toolkit.snippets.image" | indent 10 }}
securityContext:
runAsUser: 0
command:
- chown
- -R
- "nova:"
- /etc/ceph
volumeMounts:
- name: etcceph
mountPath: /etc/ceph
{{- if empty .Values.conf.ceph.cinder.keyring }}
- name: ceph-admin-keyring-placement
{{ tuple $envAll "nova_compute" | include "helm-toolkit.snippets.image" | indent 10 }}
@ -114,7 +126,7 @@ spec:
mountPath: /tmp/ceph-keyring.sh
subPath: ceph-keyring.sh
- name: ceph-etc
mountPath: /etc/ceph/ceph.conf
mountPath: /etc/ceph/ceph.conf.template
subPath: ceph.conf
readOnly: true
{{ end }}
@ -218,10 +230,9 @@ spec:
{{- if .Values.conf.ceph.enabled }}
- name: etcceph
mountPath: /etc/ceph
- name: ceph-etc
mountPath: /etc/ceph/ceph.conf
subPath: ceph.conf
readOnly: true
{{- if or ( gt .Capabilities.KubeVersion.Major "1" ) ( ge .Capabilities.KubeVersion.Minor "10" ) }}
mountPropagation: Bidirectional
{{- end }}
{{- if empty .Values.conf.ceph.cinder.keyring }}
- name: ceph-keyring
mountPath: /tmp/client-keyring
@ -296,7 +307,8 @@ spec:
defaultMode: 0444
{{- if .Values.conf.ceph.enabled }}
- name: etcceph
emptyDir: {}
hostPath:
path: /var/lib/openstack-helm/compute/nova
- name: ceph-etc
configMap:
name: {{ .Values.ceph_client.configmap }}