From a76d115e7aa255c34b983f18ac378bcde6c6e627 Mon Sep 17 00:00:00 2001 From: Oliver Ni Date: Mon, 8 Jul 2024 23:34:33 -0400 Subject: [PATCH] feat: enable pvc retain by default --- kubernetes/core/rook-ceph.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/kubernetes/core/rook-ceph.nix b/kubernetes/core/rook-ceph.nix index 8cd563c..a1d7564 100644 --- a/kubernetes/core/rook-ceph.nix +++ b/kubernetes/core/rook-ceph.nix @@ -129,7 +129,7 @@ in # ========================== resources."storage.k8s.io/v1".StorageClass = rec { - rbd-nvme-retain = { + rbd-nvme = { provisioner = "rook-ceph.rbd.csi.ceph.com"; parameters = commonStorageClassParamters // { pool = "rbd-nvme"; @@ -142,13 +142,13 @@ in imageFeatures = "layering,fast-diff,object-map,deep-flatten,exclusive-lock"; }; allowVolumeExpansion = true; - reclaimPolicy = "Retain"; + reclaimPolicy = "Delete"; }; - rbd-nvme = rbd-nvme-retain // { + rbd-nvme-retain = rbd-nvme // { metadata.annotations."storageclass.kubernetes.io/is-default-class" = "true"; allowVolumeExpansion = true; - reclaimPolicy = "Delete"; + reclaimPolicy = "Retain"; }; cephfs-nvme = { @@ -164,6 +164,11 @@ in reclaimPolicy = "Delete"; }; + cephfs-nvme-retain = cephfs-nvme // { + allowVolumeExpansion = true; + reclaimPolicy = "Retain"; + }; + rgw-nvme = { provisioner = "rook-ceph.ceph.rook.io/bucket"; reclaimPolicy = "Delete";