diff --git a/roles/kubernetes-apps/snapshots/cinder-csi/defaults/main.yml b/roles/kubernetes-apps/snapshots/cinder-csi/defaults/main.yml index 7b5dd732f..1186d98af 100644 --- a/roles/kubernetes-apps/snapshots/cinder-csi/defaults/main.yml +++ b/roles/kubernetes-apps/snapshots/cinder-csi/defaults/main.yml @@ -3,3 +3,4 @@ snapshot_classes: - name: cinder-csi-snapshot is_default: false force_create: true + deletionPolicy: Delete diff --git a/roles/kubernetes-apps/snapshots/cinder-csi/templates/cinder-csi-snapshot-class.yml.j2 b/roles/kubernetes-apps/snapshots/cinder-csi/templates/cinder-csi-snapshot-class.yml.j2 index b7e649f66..86c73cc6e 100644 --- a/roles/kubernetes-apps/snapshots/cinder-csi/templates/cinder-csi-snapshot-class.yml.j2 +++ b/roles/kubernetes-apps/snapshots/cinder-csi/templates/cinder-csi-snapshot-class.yml.j2 @@ -7,7 +7,7 @@ metadata: annotations: storageclass.kubernetes.io/is-default-class: "{{ class.is_default | default(false) | ternary("true","false") }}" driver: cinder.csi.openstack.org -deletionPolicy: Delete +deletionPolicy: "{{ class.deletionPolicy | default("Delete") }}" parameters: force-create: "{{ class.force_create }}" {% endfor %}