diff --git a/cinder/templates/job-backup-storage-init.yaml b/cinder/templates/job-backup-storage-init.yaml index 9f23112050..996692df45 100644 --- a/cinder/templates/job-backup-storage-init.yaml +++ b/cinder/templates/job-backup-storage-init.yaml @@ -80,10 +80,12 @@ spec: mountPath: /tmp/ceph-admin-keyring.sh subPath: ceph-admin-keyring.sh readOnly: true + {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring mountPath: /tmp/client-keyring subPath: key readOnly: true + {{ end }} {{ end }} containers: - name: cinder-backup-storage-init @@ -125,11 +127,13 @@ spec: mountPath: /etc/ceph/ceph.conf subPath: ceph.conf readOnly: true + {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring mountPath: /tmp/client-keyring subPath: key readOnly: true {{- end }} + {{- end }} volumes: - name: cinder-bin configMap: @@ -142,8 +146,10 @@ spec: configMap: name: ceph-etc defaultMode: 0444 + {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring secret: secretName: pvc-ceph-client-key {{ end }} + {{ end }} {{- end }} diff --git a/cinder/templates/job-storage-init.yaml b/cinder/templates/job-storage-init.yaml index dbc0f56eca..7878e99beb 100644 --- a/cinder/templates/job-storage-init.yaml +++ b/cinder/templates/job-storage-init.yaml @@ -80,10 +80,12 @@ spec: mountPath: /tmp/ceph-admin-keyring.sh subPath: ceph-admin-keyring.sh readOnly: true + {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring mountPath: /tmp/client-keyring subPath: key readOnly: true + {{ end }} {{ end }} containers: - name: cinder-storage-init @@ -125,11 +127,13 @@ spec: mountPath: /etc/ceph/ceph.conf subPath: ceph.conf readOnly: true + {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring mountPath: /tmp/client-keyring subPath: key readOnly: true {{- end }} + {{- end }} volumes: - name: cinder-bin configMap: @@ -142,8 +146,10 @@ spec: configMap: name: ceph-etc defaultMode: 0444 + {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring secret: secretName: pvc-ceph-client-key {{- end }} + {{- end }} {{- end }} diff --git a/glance/templates/job-storage-init.yaml b/glance/templates/job-storage-init.yaml index 6f79fc4298..85013c455a 100644 --- a/glance/templates/job-storage-init.yaml +++ b/glance/templates/job-storage-init.yaml @@ -80,10 +80,12 @@ spec: mountPath: /tmp/ceph-admin-keyring.sh subPath: ceph-admin-keyring.sh readOnly: true + {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring mountPath: /tmp/client-keyring subPath: key readOnly: true + {{ end }} {{ end }} containers: - name: glance-storage-init @@ -129,11 +131,13 @@ spec: mountPath: /etc/ceph/ceph.conf subPath: ceph.conf readOnly: true + {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring mountPath: /tmp/client-keyring subPath: key readOnly: true {{ end }} + {{ end }} {{- if eq .Values.storage "pvc" }} - name: glance-images mountPath: {{ .Values.conf.glance.glance_store.filesystem_store_datadir }} @@ -150,10 +154,12 @@ spec: configMap: name: ceph-etc defaultMode: 0444 + {{- if empty .Values.conf.ceph.admin_keyring }} - name: ceph-keyring secret: secretName: pvc-ceph-client-key {{ end }} + {{ end }} {{- if eq .Values.storage "pvc" }} - name: glance-images persistentVolumeClaim: diff --git a/libvirt/templates/daemonset-libvirt.yaml b/libvirt/templates/daemonset-libvirt.yaml index 2f2791479a..9b4467e76c 100644 --- a/libvirt/templates/daemonset-libvirt.yaml +++ b/libvirt/templates/daemonset-libvirt.yaml @@ -70,10 +70,12 @@ spec: mountPath: /tmp/ceph-keyring.sh subPath: ceph-keyring.sh readOnly: true + {{- if empty .Values.ceph.cinder_keyring }} - name: ceph-keyring mountPath: /tmp/client-keyring subPath: key readOnly: true + {{ end }} {{- end }} containers: - name: libvirt @@ -134,11 +136,13 @@ spec: mountPath: /etc/ceph/ceph.conf subPath: ceph.conf readOnly: true + {{- if empty .Values.ceph.cinder_keyring }} - name: ceph-keyring mountPath: /tmp/client-keyring subPath: key readOnly: true {{- end }} + {{- end }} {{ if $mounts_libvirt.volumeMounts }}{{ toYaml $mounts_libvirt.volumeMounts | indent 12 }}{{ end }} volumes: - name: libvirt-bin @@ -156,10 +160,12 @@ spec: configMap: name: ceph-etc defaultMode: 0444 + {{- if empty .Values.ceph.cinder_keyring }} - name: ceph-keyring secret: secretName: pvc-ceph-client-key {{ end }} + {{ end }} - name: libmodules hostPath: path: /lib/modules diff --git a/nova/templates/daemonset-compute.yaml b/nova/templates/daemonset-compute.yaml index 0dc6d62709..3d9f9b9748 100644 --- a/nova/templates/daemonset-compute.yaml +++ b/nova/templates/daemonset-compute.yaml @@ -87,10 +87,12 @@ spec: - name: nova-bin mountPath: /tmp/ceph-keyring.sh subPath: ceph-keyring.sh + {{- if empty .Values.ceph.cinder_keyring }} - name: ceph-keyring mountPath: /tmp/client-keyring subPath: key readOnly: true + {{ end }} {{ end }} {{- if eq .Values.console.console_kind "novnc"}} - name: nova-compute-vnc-init @@ -198,11 +200,13 @@ spec: mountPath: /etc/ceph/ceph.conf subPath: ceph.conf readOnly: true + {{- if empty .Values.ceph.cinder_keyring }} - name: ceph-keyring mountPath: /tmp/client-keyring subPath: key readOnly: true {{ end }} + {{ end }} - mountPath: /lib/modules name: libmodules readOnly: true @@ -269,10 +273,12 @@ spec: configMap: name: ceph-etc defaultMode: 0444 + {{- if empty .Values.ceph.cinder_keyring }} - name: ceph-keyring secret: secretName: pvc-ceph-client-key {{ end }} + {{ end }} - name: libmodules hostPath: path: /lib/modules