diff --git a/tasks/longhorn.yml b/tasks/longhorn.yml index 17a73a0..9dcbfc5 100644 --- a/tasks/longhorn.yml +++ b/tasks/longhorn.yml @@ -72,6 +72,21 @@ csi.storage.k8s.io/fsType: ext4 recurringJobSelector: '[{"name":"snapshot","isGroup":true}, {"name":"backup-daily","isGroup":true}]' + - name: Add longhorn & longhorn-crypt VolumeSnapshotClass + kubernetes.core.k8s: + state: present + context: "{{ my_context }}" + definition: + kind: VolumeSnapshotClass + apiVersion: snapshot.storage.k8s.io/v1 + metadata: + name: "{{ item }}" + driver: driver.longhorn.io + deletionPolicy: Delete + with_items: + - "longhorn" + - "longhorn-crypt" + - name: Install Prometheus rules kubernetes.core.k8s: state: "present"