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 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