From 3869f6bb3712654d63bab8c370a3bf8f7ae44137 Mon Sep 17 00:00:00 2001 From: Kasakaze Date: Wed, 6 Dec 2023 15:49:10 +0000 Subject: [PATCH 1/2] feat(helm): add gcEnable configuration to chart for PR #167 Signed-off-by: Kasakaze --- 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 27775a3..7554940 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 From f63f3d47c71f9c3333719c2dbb4dc6c8412628d6 Mon Sep 17 00:00:00 2001 From: Kasakaze Date: Thu, 7 Dec 2023 14:02:24 +0000 Subject: [PATCH 2/2] update: chart version Signed-off-by: Kasakaze --- deploy/helm/charts/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/helm/charts/Chart.yaml b/deploy/helm/charts/Chart.yaml index ebf0de3..0cdb448 100644 --- a/deploy/helm/charts/Chart.yaml +++ b/deploy/helm/charts/Chart.yaml @@ -4,7 +4,7 @@ description: Helm chart for OpenEBS Dynamic NFS PV. For instructions to install type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 0.10.2 +version: 0.10.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. appVersion: 0.10.0