From 099ddce5cc0313df095f7e00c6a0be7988ab4eb0 Mon Sep 17 00:00:00 2001 From: Robert Munteanu Date: Mon, 15 Feb 2021 20:40:57 +0100 Subject: [PATCH 1/3] Update chart to surface leader election flag --- .../nfs-subdir-external-provisioner/templates/deployment.yaml | 4 ++++ charts/nfs-subdir-external-provisioner/values.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/charts/nfs-subdir-external-provisioner/templates/deployment.yaml b/charts/nfs-subdir-external-provisioner/templates/deployment.yaml index 6693722f..75519915 100644 --- a/charts/nfs-subdir-external-provisioner/templates/deployment.yaml +++ b/charts/nfs-subdir-external-provisioner/templates/deployment.yaml @@ -55,6 +55,10 @@ spec: value: {{ .Values.nfs.server }} - name: NFS_PATH value: {{ .Values.nfs.path }} + {{- if eq .Values.leaderElection.enabled false }} + - name: ENABLE_LEADER_ELECTION + value: false + {{- end }} {{- with .Values.resources }} resources: {{ toYaml . | indent 12 }} diff --git a/charts/nfs-subdir-external-provisioner/values.yaml b/charts/nfs-subdir-external-provisioner/values.yaml index 0b5e4e5b..95c23038 100644 --- a/charts/nfs-subdir-external-provisioner/values.yaml +++ b/charts/nfs-subdir-external-provisioner/values.yaml @@ -38,6 +38,10 @@ storageClass: # Set access mode - ReadWriteOnce, ReadOnlyMany or ReadWriteMany accessModes: ReadWriteOnce +leaderElection: + # When set to false leader election will be disabled + enabled: true + ## For RBAC support: rbac: # Specifies whether RBAC resources should be created From 8903a7c07344f90e5018594598b310ceabce7edc Mon Sep 17 00:00:00 2001 From: Robert Munteanu Date: Tue, 16 Feb 2021 10:21:09 +0100 Subject: [PATCH 2/3] Document leaderElection.enabled flag 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 d9be5248..ac692969 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -62,6 +62,7 @@ The following tables lists the configurable parameters of this chart and their d | `storageClass.provisionerName` | Name of the provisionerName | null | | `storageClass.archiveOnDelete` | Archive pvc when deleting | `true` | | `storageClass.accessModes` | Set access mode for PV | `ReadWriteOnce` | +| `leaderElection.enabled` | Enables or disables leader election | `true` | | `nfs.server` | Hostname of the NFS server (required) | null (ip or hostname) | | `nfs.path` | Basepath of the mount point to be used | `/nfs-storage` | | `nfs.mountOptions` | Mount options (e.g. 'nfsvers=3') | null | From 11566f6795dddb557f726f5364f6ca86e75d931d Mon Sep 17 00:00:00 2001 From: Robert Munteanu Date: Tue, 16 Feb 2021 11:03:59 +0100 Subject: [PATCH 3/3] 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 4b895554..bca7167f 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.0 +version: 4.0.1 kubeVersion: ">=1.9.0-0" sources: - https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner