From 584dc27a9e7af23913d27d6b2c7e4e2c6b351e37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93lafur=20Haukur=20Flygenring?= Date: Fri, 10 Sep 2021 09:41:17 +0000 Subject: [PATCH] * New value in values.yaml that allows you to have different reclaimPolicies for the StorageClass and the NFS PV. Closes issue; https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner/issues/128 --- .../templates/persistentvolume.yaml | 2 +- charts/nfs-subdir-external-provisioner/values.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/nfs-subdir-external-provisioner/templates/persistentvolume.yaml b/charts/nfs-subdir-external-provisioner/templates/persistentvolume.yaml index 88eb04d1..9d6ba4d5 100644 --- a/charts/nfs-subdir-external-provisioner/templates/persistentvolume.yaml +++ b/charts/nfs-subdir-external-provisioner/templates/persistentvolume.yaml @@ -12,7 +12,7 @@ spec: volumeMode: Filesystem accessModes: - {{ .Values.storageClass.accessModes }} - persistentVolumeReclaimPolicy: {{ .Values.storageClass.reclaimPolicy }} + persistentVolumeReclaimPolicy: {{ .Values.nfs.reclaimPolicy }} storageClassName: "" {{- if .Values.nfs.mountOptions }} mountOptions: diff --git a/charts/nfs-subdir-external-provisioner/values.yaml b/charts/nfs-subdir-external-provisioner/values.yaml index 0a4f03dc..1f911e7e 100644 --- a/charts/nfs-subdir-external-provisioner/values.yaml +++ b/charts/nfs-subdir-external-provisioner/values.yaml @@ -12,6 +12,7 @@ nfs: path: /nfs-storage mountOptions: volumeName: nfs-subdir-external-provisioner-root + reclaimPolicy: Delete # Reclaim policy for the main nfs volume # For creating the StorageClass automatically: storageClass: