From 455610a298f19840bf6cbf1e0ff7f60038b3dc18 Mon Sep 17 00:00:00 2001 From: Niladri Halder Date: Fri, 8 Dec 2023 14:12:41 +0530 Subject: [PATCH] charts: change helm value enableGarbageCollection to a bool Signed-off-by: Niladri Halder --- cmd/provisioner-nfs/main.go | 3 ++- deploy/helm/charts/Chart.yaml | 4 ++-- deploy/helm/charts/README.md | 8 ++++---- deploy/helm/charts/templates/deployment.yaml | 6 ++++-- deploy/helm/charts/values.yaml | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/cmd/provisioner-nfs/main.go b/cmd/provisioner-nfs/main.go index 9329e157..eefaafb2 100644 --- a/cmd/provisioner-nfs/main.go +++ b/cmd/provisioner-nfs/main.go @@ -19,8 +19,9 @@ package main import ( "os" - "github.com/openebs/dynamic-nfs-provisioner/cmd/provisioner-nfs/app" logger "github.com/openebs/maya/pkg/logs" + + "github.com/openebs/dynamic-nfs-provisioner/cmd/provisioner-nfs/app" ) func main() { diff --git a/deploy/helm/charts/Chart.yaml b/deploy/helm/charts/Chart.yaml index ebf0de3c..39ed3e16 100644 --- a/deploy/helm/charts/Chart.yaml +++ b/deploy/helm/charts/Chart.yaml @@ -4,10 +4,10 @@ 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.11.0 # 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 +appVersion: 0.11.0 icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/openebs/icon/color/openebs-icon-color.png home: http://www.openebs.io/ keywords: diff --git a/deploy/helm/charts/README.md b/deploy/helm/charts/README.md index 5725def8..7d11c515 100644 --- a/deploy/helm/charts/README.md +++ b/deploy/helm/charts/README.md @@ -117,13 +117,13 @@ helm install openebs-nfs openebs-nfs/nfs-provisioner --namespace openebs --creat | `nfsProvisioner.healthCheck.periodSeconds` | How often to perform the liveness probe | `60` | | `nfsProvisioner.image.registry` | Registry for NFS Provisioner image | `""` | | `nfsProvisioner.image.repository` | Image repository for NFS Provisioner | `openebs/provisioner-nfs` | -| `nfsProvisioner.image.tag` | Image tag for NFS Provisioner | `0.10.0` | +| `nfsProvisioner.image.tag` | Image tag for NFS Provisioner | `0.11.0` | | `nfsProvisioner.image.pullPolicy` | Image pull policy for NFS Provisioner image | `IfNotPresent` | | `nfsProvisioner.annotations` | Annotations for NFS Provisioner metadata | `""` | | `nfsProvisioner.nodeSelector` | Nodeselector for NFS Provisioner pod | `""` | | `nfsProvisioner.nfsServerAlpineImage.registry` | Registry for nfs-server-alpine | `""` | | `nfsProvisioner.nfsServerAlpineImage.repository` | Image repository for nfs-server-alpine | `openebs/nfs-server-alpine` | -| `nfsProvisioner.nfsServerAlpineImage.tag` | Image tag for nfs-server-alpine | `0.10.0` | +| `nfsProvisioner.nfsServerAlpineImage.tag` | Image tag for nfs-server-alpine | `0.11.0` | | `nfsProvisioner.resources` | Resource request and limit for the container | `true` | | `nfsProvisioner.securityContext` | Security context for container | `""` | | `nfsProvisioner.tolerations` | NFS Provisioner pod toleration values | `""` | @@ -131,9 +131,9 @@ 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` | +| `nfsProvisioner.enableGarbageCollection` | Enable garbage collection for the backend PVC | `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.mountOptions` | NFS mount options to be passed on to storageclass | `[]` | `nfsStorageClass.isDefaultClass` | Make 'openebs-kernel-nfs' the default StorageClass | `"false"` | | `nfsStorageClass.reclaimPolicy` | ReclaimPolicy for NFS PVs | `"Delete"` | | `nfsStorageClass.leaseTime` | Renewal period(in seconds) for NFS client state | `90` | diff --git a/deploy/helm/charts/templates/deployment.yaml b/deploy/helm/charts/templates/deployment.yaml index 4746c8c2..2d02f739 100644 --- a/deploy/helm/charts/templates/deployment.yaml +++ b/deploy/helm/charts/templates/deployment.yaml @@ -105,9 +105,11 @@ spec: {{- 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. + {{- if .Values.nfsProvisioner.enableGarbageCollection }} - name: OPENEBS_IO_NFS_SERVER_GARBAGE_COLLECTION_ENABLED - value: "{{ .Values.nfsProvisioner.enableGarbageCollection }}" - {{- if .Values.nfsProvisioner.nfsBackendPvcTimeout }} + value: {{ quote .Values.nfsProvisioner.enableGarbageCollection }} + {{- end }} + {{- if .Values.nfsProvisioner.nfsBackendPvcTimeout }} - name: OPENEBS_IO_NFS_SERVER_BACKEND_PVC_TIMEOUT value: "{{ .Values.nfsProvisioner.nfsBackendPvcTimeout }}" {{- end }} diff --git a/deploy/helm/charts/values.yaml b/deploy/helm/charts/values.yaml index c3670f77..bcd1846b 100644 --- a/deploy/helm/charts/values.yaml +++ b/deploy/helm/charts/values.yaml @@ -42,7 +42,7 @@ nfsProvisioner: 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" + 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 @@ -116,7 +116,7 @@ nfsStorageClass: # for the NFS server's shared filesystem volume. # File permission changes are applied recursively if the root of the # volume's filesystem does not match the specified value. - # For more information: https://github.com/openebs/dynamic-nfs-provisioner/blob/develop/docs/tutorial/file-permissions.md + # For more info: https://github.com/openebs/dynamic-nfs-provisioner/blob/develop/docs/tutorial/file-permissions.md filePermissions: {} # The UID value is used to set the user-owner of NFS shared directory. Only valid # UIDs are accepted.