From 819f6d382d498974ee1737d81bd80b34178d402b Mon Sep 17 00:00:00 2001 From: mustache1up Date: Thu, 4 Mar 2021 23:32:48 -0300 Subject: [PATCH 1/8] Add onDelete support to helm chart --- .../templates/storageclass.yaml | 3 +++ charts/nfs-subdir-external-provisioner/values.yaml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/charts/nfs-subdir-external-provisioner/templates/storageclass.yaml b/charts/nfs-subdir-external-provisioner/templates/storageclass.yaml index 22576c57..80122dd0 100644 --- a/charts/nfs-subdir-external-provisioner/templates/storageclass.yaml +++ b/charts/nfs-subdir-external-provisioner/templates/storageclass.yaml @@ -20,6 +20,9 @@ parameters: {{- if .Values.storageClass.pathPattern }} pathPattern: "{{ .Values.storageClass.pathPattern }}" {{- end }} + {{- if .Values.storageClass.onDelete }} + onDelete: "{{ .Values.storageClass.onDelete }}" + {{- end }} {{- if .Values.nfs.mountOptions }} mountOptions: {{- range .Values.nfs.mountOptions }} diff --git a/charts/nfs-subdir-external-provisioner/values.yaml b/charts/nfs-subdir-external-provisioner/values.yaml index cd03acc5..9db5f790 100644 --- a/charts/nfs-subdir-external-provisioner/values.yaml +++ b/charts/nfs-subdir-external-provisioner/values.yaml @@ -35,6 +35,11 @@ storageClass: # When set to false your PVs will not be archived by the provisioner upon deletion of the PVC. archiveOnDelete: true + # If it exists and has a delete value, delete the directory, if it exists and has a retain value, save the directory. + # Overrides archiveOnDelete. + # Ignored if value not set. + onDelete: + # Specifies a template for creating a directory path via PVC metadata's such as labels, annotations, name or namespace. # Ignored if value not set. pathPattern: From a57db9a5a72c08c2dfa0d954b7a2317db1ae31c5 Mon Sep 17 00:00:00 2001 From: mustache1up Date: Thu, 4 Mar 2021 23:33:36 -0300 Subject: [PATCH 2/8] Document storageClass.onDelete param for the helm chart --- charts/nfs-subdir-external-provisioner/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/nfs-subdir-external-provisioner/README.md b/charts/nfs-subdir-external-provisioner/README.md index d097e7fb..ea9c5a3a 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -61,6 +61,7 @@ The following tables lists the configurable parameters of this chart and their d | `storageClass.reclaimPolicy` | Method used to reclaim an obsoleted volume | `Delete` | | `storageClass.provisionerName` | Name of the provisionerName | null | | `storageClass.archiveOnDelete` | Archive pvc when deleting | `true` | +| `storageClass.onDelete` | Defines strategy on pvc deletion, overrides archiveOnDelete | null | | `storageClass.pathPattern` | Specifies a template for the directory name | null | | `storageClass.accessModes` | Set access mode for PV | `ReadWriteOnce` | | `leaderElection.enabled` | Enables or disables leader election | `true` | From 1e913d1ade771f72c06d5e6571279f61e4bcafb5 Mon Sep 17 00:00:00 2001 From: mustache1up Date: Thu, 4 Mar 2021 23:34:02 -0300 Subject: [PATCH 3/8] Bump chart version --- charts/nfs-subdir-external-provisioner/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/nfs-subdir-external-provisioner/Chart.yaml b/charts/nfs-subdir-external-provisioner/Chart.yaml index 97730385..9b108da0 100644 --- a/charts/nfs-subdir-external-provisioner/Chart.yaml +++ b/charts/nfs-subdir-external-provisioner/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 4.0.0 description: nfs-subdir-external-provisioner is an automatic provisioner that used your *already configured* NFS server, automatically creating Persistent Volumes. name: nfs-subdir-external-provisioner home: https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner -version: 4.0.2 +version: 4.0.4 kubeVersion: ">=1.9.0-0" sources: - https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner From c50d1aea01ae6d11fccc74de3bf13877b4feb654 Mon Sep 17 00:00:00 2001 From: mustache1up Date: Fri, 5 Mar 2021 23:43:05 -0300 Subject: [PATCH 4/8] document valid values for storageClass.onDelete chart param --- charts/nfs-subdir-external-provisioner/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/nfs-subdir-external-provisioner/README.md b/charts/nfs-subdir-external-provisioner/README.md index ea9c5a3a..e60231d8 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -61,7 +61,7 @@ The following tables lists the configurable parameters of this chart and their d | `storageClass.reclaimPolicy` | Method used to reclaim an obsoleted volume | `Delete` | | `storageClass.provisionerName` | Name of the provisionerName | null | | `storageClass.archiveOnDelete` | Archive pvc when deleting | `true` | -| `storageClass.onDelete` | Defines strategy on pvc deletion, overrides archiveOnDelete | null | +| `storageClass.onDelete` | Strategy on pvc deletion. Overrides archiveOnDelete when set to lowercase values 'delete' or 'retain' | null | | `storageClass.pathPattern` | Specifies a template for the directory name | null | | `storageClass.accessModes` | Set access mode for PV | `ReadWriteOnce` | | `leaderElection.enabled` | Enables or disables leader election | `true` | From b33cad598a1a0d34d2ee07b5c137bf8275c54cda Mon Sep 17 00:00:00 2001 From: mustache1up Date: Fri, 5 Mar 2021 23:48:41 -0300 Subject: [PATCH 5/8] adapt values.yaml for linter removing trailling spaces on empty params --- charts/nfs-subdir-external-provisioner/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/nfs-subdir-external-provisioner/values.yaml b/charts/nfs-subdir-external-provisioner/values.yaml index 9db5f790..8ae9c161 100644 --- a/charts/nfs-subdir-external-provisioner/values.yaml +++ b/charts/nfs-subdir-external-provisioner/values.yaml @@ -38,11 +38,11 @@ storageClass: # If it exists and has a delete value, delete the directory, if it exists and has a retain value, save the directory. # Overrides archiveOnDelete. # Ignored if value not set. - onDelete: + onDelete: # Specifies a template for creating a directory path via PVC metadata's such as labels, annotations, name or namespace. # Ignored if value not set. - pathPattern: + pathPattern: # Set access mode - ReadWriteOnce, ReadOnlyMany or ReadWriteMany accessModes: ReadWriteOnce From 8e20383b4c99ec40e3c0b7d0c63ec54c0f01ab73 Mon Sep 17 00:00:00 2001 From: mustache1up Date: Tue, 9 Mar 2021 18:22:44 -0300 Subject: [PATCH 6/8] Standardize chart param 'PVC's as uppercase and accepted values with code markdown --- charts/nfs-subdir-external-provisioner/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/nfs-subdir-external-provisioner/README.md b/charts/nfs-subdir-external-provisioner/README.md index e60231d8..f54a4c99 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -60,8 +60,8 @@ The following tables lists the configurable parameters of this chart and their d | `storageClass.allowVolumeExpansion` | Allow expanding the volume | `true` | | `storageClass.reclaimPolicy` | Method used to reclaim an obsoleted volume | `Delete` | | `storageClass.provisionerName` | Name of the provisionerName | null | -| `storageClass.archiveOnDelete` | Archive pvc when deleting | `true` | -| `storageClass.onDelete` | Strategy on pvc deletion. Overrides archiveOnDelete when set to lowercase values 'delete' or 'retain' | null | +| `storageClass.archiveOnDelete` | Archive PVC when deleting | `true` | +| `storageClass.onDelete` | Strategy on PVC deletion. Overrides `archiveOnDelete` when set to lowercase values `delete` or `retain` | null | | `storageClass.pathPattern` | Specifies a template for the directory name | null | | `storageClass.accessModes` | Set access mode for PV | `ReadWriteOnce` | | `leaderElection.enabled` | Enables or disables leader election | `true` | From 8b8d398b53f00c82db7c46c554ea9b5a13c07273 Mon Sep 17 00:00:00 2001 From: mustache1up Date: Wed, 10 Mar 2021 17:55:58 -0300 Subject: [PATCH 7/8] Bump chart version --- charts/nfs-subdir-external-provisioner/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/nfs-subdir-external-provisioner/Chart.yaml b/charts/nfs-subdir-external-provisioner/Chart.yaml index 9b108da0..5da18ddf 100644 --- a/charts/nfs-subdir-external-provisioner/Chart.yaml +++ b/charts/nfs-subdir-external-provisioner/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 4.0.0 description: nfs-subdir-external-provisioner is an automatic provisioner that used your *already configured* NFS server, automatically creating Persistent Volumes. name: nfs-subdir-external-provisioner home: https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner -version: 4.0.4 +version: 4.0.5 kubeVersion: ">=1.9.0-0" sources: - https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner From 7417303508cabba8fe056e8c39e7208c00983301 Mon Sep 17 00:00:00 2001 From: mustache1up Date: Sun, 21 Mar 2021 02:08:03 -0300 Subject: [PATCH 8/8] enhance onDelete description on values.yaml --- charts/nfs-subdir-external-provisioner/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/nfs-subdir-external-provisioner/values.yaml b/charts/nfs-subdir-external-provisioner/values.yaml index 8ae9c161..66b83c59 100644 --- a/charts/nfs-subdir-external-provisioner/values.yaml +++ b/charts/nfs-subdir-external-provisioner/values.yaml @@ -35,7 +35,7 @@ storageClass: # When set to false your PVs will not be archived by the provisioner upon deletion of the PVC. archiveOnDelete: true - # If it exists and has a delete value, delete the directory, if it exists and has a retain value, save the directory. + # If it exists and has 'delete' value, delete the directory. If it exists and has 'retain' value, save the directory. # Overrides archiveOnDelete. # Ignored if value not set. onDelete: