From 51e31ce902940d8fd465f84a726d988261b13d16 Mon Sep 17 00:00:00 2001 From: Kasakaze Date: Wed, 6 Dec 2023 15:49:10 +0000 Subject: [PATCH] feat(helm): add gcEnable configuration to chart for PR #167 Signed-off-by: Kasakaze Signed-off-by: Niladri Halder --- deploy/helm/charts/README.md | 1 + deploy/helm/charts/templates/deployment.yaml | 4 ++++ deploy/helm/charts/values.yaml | 3 +++ 3 files changed, 8 insertions(+) diff --git a/deploy/helm/charts/README.md b/deploy/helm/charts/README.md index 8ef81e6..5725def 100644 --- a/deploy/helm/charts/README.md +++ b/deploy/helm/charts/README.md @@ -131,6 +131,7 @@ helm install openebs-nfs openebs-nfs/nfs-provisioner --namespace openebs --creat | `nfsProvisioner.nfsServerNodeAffinity` | NFS Server node affinity rules | `""` | | `nfsProvisioner.nfsBackendPvcTimeout` | Timeout for backend PVC binding in seconds | `"60"` | | `nfsProvisioner.nfsHookConfigMap` | Existing Configmap name to load hook configuration | `""` | +| `nfsProvisioner.enableGarbageCollection` | Enable garbage collection | `true` | | `nfsStorageClass.backendStorageClass` | StorageClass to be used to provision the backend volume. If not specified, the default StorageClass is used. | `""` | | `nfsStorageClass.mountOptions` | NFS mount options to be passed on to storageclass | `[]` | `nfsStorageClass.isDefaultClass` | Make 'openebs-kernel-nfs' the default StorageClass | `"false"` | diff --git a/deploy/helm/charts/templates/deployment.yaml b/deploy/helm/charts/templates/deployment.yaml index c2a00a1..4746c8c 100644 --- a/deploy/helm/charts/templates/deployment.yaml +++ b/deploy/helm/charts/templates/deployment.yaml @@ -103,6 +103,10 @@ spec: - name: OPENEBS_IO_NFS_SERVER_NODE_AFFINITY value: "{{ .Values.nfsProvisioner.nfsServerNodeAffinity }}" {{- end }} + # Provide a switch to turn off the function of clearing stale pvc to avoid + # garbage collecting an NFS backend PVC if the NFS PVC is deleted. + - name: OPENEBS_IO_NFS_SERVER_GARBAGE_COLLECTION_ENABLED + value: "{{ .Values.nfsProvisioner.enableGarbageCollection }}" {{- if .Values.nfsProvisioner.nfsBackendPvcTimeout }} - name: OPENEBS_IO_NFS_SERVER_BACKEND_PVC_TIMEOUT value: "{{ .Values.nfsProvisioner.nfsBackendPvcTimeout }}" diff --git a/deploy/helm/charts/values.yaml b/deploy/helm/charts/values.yaml index 269ed0b..c3670f7 100644 --- a/deploy/helm/charts/values.yaml +++ b/deploy/helm/charts/values.yaml @@ -40,6 +40,9 @@ nfsProvisioner: tag: pullPolicy: IfNotPresent enableLeaderElection: "true" + # Provide a switch to turn off the function of clearing stale pvc to avoid + # garbage collecting an NFS backend PVC if the NFS PVC is deleted. + enableGarbageCollection: "true" # Specify image name of nfs-server-alpine used for creating nfs server deployment # If not mentioned, default value openebs/nfs-server-alpine:tag will be used where # the tag will be the same as a provisioner-nfs image tag