From 819f6d382d498974ee1737d81bd80b34178d402b Mon Sep 17 00:00:00 2001 From: mustache1up Date: Thu, 4 Mar 2021 23:32:48 -0300 Subject: [PATCH 01/16] 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 02/16] 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 03/16] 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 04/16] 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 05/16] 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 06/16] 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 07/16] 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 e5d160f03e9bb18f0c8b87b0cf19cf0cfea95783 Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Thu, 11 Mar 2021 20:14:30 +0200 Subject: [PATCH 08/16] Add yonatankahana to OWNERS file Signed-off-by: Yonatan Kahana --- OWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/OWNERS b/OWNERS index 7d522bfa..b1bd5a24 100644 --- a/OWNERS +++ b/OWNERS @@ -6,3 +6,4 @@ approvers: - kmova - jackielii - ashishranjan738 + - yonatankahana From 8c82a356277a9e184a13ae8b178184f04856c8e9 Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Sun, 14 Mar 2021 20:07:23 +0200 Subject: [PATCH 09/16] Add changelog for 4.0.1 Signed-off-by: Yonatan Kahana --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d2ddae7..2e516043 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# v4.0.1 +- Add arm7 (32bit) support (https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/pull/58) +- Preserve name of the PV directory name during archiving (https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/pull/59) + # v4.0.0 - Remove redundant field in the rbac.yaml (https://github.com/kubernetes-retired/external-storage/pull/970) - Use `kubernetes-sigs/sig-storage-lib-external-provisioner` instead of `incubator/external-storage/lib` (https://github.com/kubernetes-retired/external-storage/pull/1026) From 9affea26582b7492ae2dd3a878951a3fd9b88791 Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Wed, 17 Mar 2021 18:59:02 +0200 Subject: [PATCH 10/16] Bump helm chart to 4.0.1 Signed-off-by: Yonatan Kahana --- README.md | 2 +- charts/nfs-subdir-external-provisioner/Chart.yaml | 4 ++-- charts/nfs-subdir-external-provisioner/README.md | 2 +- charts/nfs-subdir-external-provisioner/values.yaml | 2 +- deploy/deployment.yaml | 2 +- deploy/objects/deployment.yaml | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8159deae..ba6d6ccc 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner - image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0 + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.1 volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes diff --git a/charts/nfs-subdir-external-provisioner/Chart.yaml b/charts/nfs-subdir-external-provisioner/Chart.yaml index 9b108da0..c0376fe4 100644 --- a/charts/nfs-subdir-external-provisioner/Chart.yaml +++ b/charts/nfs-subdir-external-provisioner/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v1 -appVersion: 4.0.0 +appVersion: 4.0.1 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 diff --git a/charts/nfs-subdir-external-provisioner/README.md b/charts/nfs-subdir-external-provisioner/README.md index d097e7fb..7fe64834 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -53,7 +53,7 @@ The following tables lists the configurable parameters of this chart and their d | `replicaCount` | Number of provisioner instances to deployed | `1` | | `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` | | `image.repository` | Provisioner image | `gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner` | -| `image.tag` | Version of provisioner image | `v4.0.0` | +| `image.tag` | Version of provisioner image | `v4.0.1` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` | | `storageClass.name` | Name of the storageClass | `nfs-client` | | `storageClass.defaultClass` | Set as the default StorageClass | `false` | diff --git a/charts/nfs-subdir-external-provisioner/values.yaml b/charts/nfs-subdir-external-provisioner/values.yaml index 9e670f55..8e414318 100644 --- a/charts/nfs-subdir-external-provisioner/values.yaml +++ b/charts/nfs-subdir-external-provisioner/values.yaml @@ -3,7 +3,7 @@ strategyType: Recreate image: repository: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner - tag: v4.0.0 + tag: v4.0.1 pullPolicy: IfNotPresent nfs: diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index a76f6339..c3985a45 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -21,7 +21,7 @@ spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner - image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0 + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.1 volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes diff --git a/deploy/objects/deployment.yaml b/deploy/objects/deployment.yaml index 7519f51a..6951d116 100644 --- a/deploy/objects/deployment.yaml +++ b/deploy/objects/deployment.yaml @@ -14,7 +14,7 @@ spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner - image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0 + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.1 volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes From 7417303508cabba8fe056e8c39e7208c00983301 Mon Sep 17 00:00:00 2001 From: mustache1up Date: Sun, 21 Mar 2021 02:08:03 -0300 Subject: [PATCH 11/16] 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: From f86551598e6a2103fdc3b434fdccef1526b4671d Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Wed, 24 Mar 2021 17:53:09 +0200 Subject: [PATCH 12/16] Bump helm chart version to release v4.0.1 Signed-off-by: Yonatan Kahana --- 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 c0376fe4..03cb3590 100644 --- a/charts/nfs-subdir-external-provisioner/Chart.yaml +++ b/charts/nfs-subdir-external-provisioner/Chart.yaml @@ -3,7 +3,7 @@ appVersion: 4.0.1 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.5 +version: 4.0.6 kubeVersion: ">=1.9.0-0" sources: - https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner From b5b29182159e7e1796ae797202b73aec02fbd6a5 Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Fri, 26 Mar 2021 12:44:46 +0300 Subject: [PATCH 13/16] Remove old cloudbuild symlink Signed-off-by: Yonatan Kahana --- .cloudbuild.sh | 1 - 1 file changed, 1 deletion(-) delete mode 120000 .cloudbuild.sh diff --git a/.cloudbuild.sh b/.cloudbuild.sh deleted file mode 120000 index d9b2a9a3..00000000 --- a/.cloudbuild.sh +++ /dev/null @@ -1 +0,0 @@ -./release-tools/cloudbuild.sh \ No newline at end of file From b668ec9f74eb7cd7b2c0d8e74d7ee8a82ba3924f Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Fri, 26 Mar 2021 12:48:43 +0300 Subject: [PATCH 14/16] Update cloudbuild with multiarch platforms Signed-off-by: Yonatan Kahana --- .cloudbuild.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 .cloudbuild.sh diff --git a/.cloudbuild.sh b/.cloudbuild.sh new file mode 100755 index 00000000..32b544ed --- /dev/null +++ b/.cloudbuild.sh @@ -0,0 +1,21 @@ +#! /bin/bash + +# Copyright 2020 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +: ${CSI_PROW_BUILD_PLATFORMS:="linux amd64; linux arm -arm; linux arm64 -arm64; linux ppc64le -ppc64le; linux s390x -s390x"} + +# shellcheck disable=SC1091 +. release-tools/cloudbuild.sh From cadce2dbc9d4557631dfefafc1d743cc6650ad9a Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Tue, 30 Mar 2021 11:04:36 +0300 Subject: [PATCH 15/16] Bump version to 4.0.2 Signed-off-by: Yonatan Kahana --- CHANGELOG.md | 4 +++- README.md | 2 +- charts/nfs-subdir-external-provisioner/Chart.yaml | 4 ++-- charts/nfs-subdir-external-provisioner/README.md | 2 +- charts/nfs-subdir-external-provisioner/values.yaml | 2 +- deploy/deployment.yaml | 2 +- deploy/objects/deployment.yaml | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e516043..10d5b7d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ -# v4.0.1 +# v4.0.2 - Add arm7 (32bit) support (https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/pull/58) + +# v4.0.1 - Preserve name of the PV directory name during archiving (https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/pull/59) # v4.0.0 diff --git a/README.md b/README.md index ba6d6ccc..f57b09a4 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner - image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.1 + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.2 volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes diff --git a/charts/nfs-subdir-external-provisioner/Chart.yaml b/charts/nfs-subdir-external-provisioner/Chart.yaml index 03cb3590..7ec28c98 100644 --- a/charts/nfs-subdir-external-provisioner/Chart.yaml +++ b/charts/nfs-subdir-external-provisioner/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v1 -appVersion: 4.0.1 +appVersion: 4.0.2 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.6 +version: 4.0.7 kubeVersion: ">=1.9.0-0" sources: - https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner diff --git a/charts/nfs-subdir-external-provisioner/README.md b/charts/nfs-subdir-external-provisioner/README.md index 7b6ec620..48270e59 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -53,7 +53,7 @@ The following tables lists the configurable parameters of this chart and their d | `replicaCount` | Number of provisioner instances to deployed | `1` | | `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` | | `image.repository` | Provisioner image | `gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner` | -| `image.tag` | Version of provisioner image | `v4.0.1` | +| `image.tag` | Version of provisioner image | `v4.0.2` | | `image.pullPolicy` | Image pull policy | `IfNotPresent` | | `storageClass.name` | Name of the storageClass | `nfs-client` | | `storageClass.defaultClass` | Set as the default StorageClass | `false` | diff --git a/charts/nfs-subdir-external-provisioner/values.yaml b/charts/nfs-subdir-external-provisioner/values.yaml index 0129c01d..02eda6e6 100644 --- a/charts/nfs-subdir-external-provisioner/values.yaml +++ b/charts/nfs-subdir-external-provisioner/values.yaml @@ -3,7 +3,7 @@ strategyType: Recreate image: repository: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner - tag: v4.0.1 + tag: v4.0.2 pullPolicy: IfNotPresent nfs: diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index c3985a45..1b45fe2a 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -21,7 +21,7 @@ spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner - image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.1 + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.2 volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes diff --git a/deploy/objects/deployment.yaml b/deploy/objects/deployment.yaml index 6951d116..b45e71d8 100644 --- a/deploy/objects/deployment.yaml +++ b/deploy/objects/deployment.yaml @@ -14,7 +14,7 @@ spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner - image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.1 + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.2 volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes From b8e203661b0b2d3be35342be8869de2125782ebc Mon Sep 17 00:00:00 2001 From: zhoumiao Date: Wed, 31 Mar 2021 21:23:20 +0800 Subject: [PATCH 16/16] prevent mounting of root directory If storageClass enable pathPattern like: `pathPattern: "${.PVC.annotations.nfs.io/storage-path}"` but pvc without annotation would make empty `customPath` and create a pv with nfs root path. --- cmd/nfs-subdir-external-provisioner/provisioner.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/nfs-subdir-external-provisioner/provisioner.go b/cmd/nfs-subdir-external-provisioner/provisioner.go index 4f2ec6a9..2d357c11 100644 --- a/cmd/nfs-subdir-external-provisioner/provisioner.go +++ b/cmd/nfs-subdir-external-provisioner/provisioner.go @@ -104,8 +104,10 @@ func (p *nfsProvisioner) Provision(ctx context.Context, options controller.Provi pathPattern, exists := options.StorageClass.Parameters["pathPattern"] if exists { customPath := metadata.stringParser(pathPattern) - path = filepath.Join(p.path, customPath) - fullPath = filepath.Join(mountPath, customPath) + if customPath != "" { + path = filepath.Join(p.path, customPath) + fullPath = filepath.Join(mountPath, customPath) + } } glog.V(4).Infof("creating path %s", fullPath)