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 set -ex
export HOME=/tmp export HOME=/tmp
cp -vf /etc/ceph/ceph.conf.template /etc/ceph/ceph.conf
KEYRING=/etc/ceph/ceph.client.${CEPH_CINDER_USER}.keyring KEYRING=/etc/ceph/ceph.client.${CEPH_CINDER_USER}.keyring
{{- if .Values.conf.ceph.cinder.keyring }} {{- if .Values.conf.ceph.cinder.keyring }}
cat > ${KEYRING} <<EOF cat > ${KEYRING} <<EOF

View File

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