diff --git a/cinder/templates/deployment-backup.yaml b/cinder/templates/deployment-backup.yaml index c87d103f..e0bc1d81 100644 --- a/cinder/templates/deployment-backup.yaml +++ b/cinder/templates/deployment-backup.yaml @@ -107,6 +107,21 @@ spec: - name: cinder-backup mountPath: {{ .Values.conf.cinder.DEFAULT.backup_posix_path }} {{ end }} + {{- if eq ( split "://" .Values.conf.cinder.coordination.backend_url )._0 "file" }} + - name: ceph-coordination-volume-perms + image: {{ .Values.images.tags.cinder_backup }} + imagePullPolicy: {{ .Values.images.pull_policy }} + securityContext: + runAsUser: 0 + command: + - chown + - -R + - "cinder:" + - {{ ( split "://" .Values.conf.cinder.coordination.backend_url )._1 }} + volumeMounts: + - name: cinder-coordination + mountPath: {{ ( split "://" .Values.conf.cinder.coordination.backend_url )._1 }} + {{ end }} containers: - name: cinder-backup image: {{ .Values.images.tags.cinder_backup }} @@ -144,6 +159,10 @@ spec: - name: cinder-backup mountPath: {{ .Values.conf.cinder.DEFAULT.backup_posix_path }} {{- end }} + {{- if eq ( split "://" .Values.conf.cinder.coordination.backend_url )._0 "file" }} + - name: cinder-coordination + mountPath: {{ ( split "://" .Values.conf.cinder.coordination.backend_url )._1 }} + {{- end }} - name: cinder-etc # NOTE (Portdirect): We mount here to override Kollas # custom sudoers file when using Kolla images, this @@ -196,5 +215,11 @@ spec: persistentVolumeClaim: claimName: cinder-backup {{- end }} + {{- if eq ( split "://" .Values.conf.cinder.coordination.backend_url )._0 "file" }} + #NOTE (portdirect): this will need to be set to a shared mount amongst all cinder + # pods for the coordination backend to be fully functional. + - name: cinder-coordination + emptyDir: {} + {{- end }} {{ if $mounts_cinder_backup.volumes }}{{ toYaml $mounts_cinder_backup.volumes | indent 8 }}{{ end }} {{- end }} diff --git a/cinder/values.yaml b/cinder/values.yaml index 519cd359..6d9a42cd 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -446,6 +446,8 @@ conf: lock_path: "/var/lib/cinder/tmp" oslo_messaging_notifications: driver: messagingv2 + coordination: + backend_url: file:///var/lib/cinder/coordination backends: # Those options will be written to backends.conf as-is. rbd1: