From 65b3ac93b6e8f621fc6b42dd1d2cb1d7a6be2b9e Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Fri, 7 Jan 2022 13:40:36 +0200 Subject: [PATCH 1/2] docs: consistent StorageClass names, multiple provisioners installation --- README.md | 4 ++-- charts/nfs-subdir-external-provisioner/Chart.yaml | 2 +- charts/nfs-subdir-external-provisioner/README.md | 14 +++++++++++++- deploy/class.yaml | 2 +- deploy/objects/class.yaml | 2 +- deploy/test-claim.yaml | 2 +- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e147a6a3..835b04a6 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ This is `deploy/class.yaml` which defines the NFS subdir external provisioner's apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: - name: managed-nfs-storage + name: nfs-client provisioner: k8s-sigs.io/nfs-subdir-external-provisioner # or choose another name, must match deployment's env PROVISIONER_NAME' parameters: pathPattern: "${.PVC.namespace}/${.PVC.annotations.nfs.io/storage-path}" # waits for nfs.io/storage-path annotation, if not specified will accept as empty string. @@ -166,7 +166,7 @@ metadata: annotations: nfs.io/storage-path: "test-path" # not required, depending on whether this annotation was shown in the storage class description spec: - storageClassName: managed-nfs-storage + storageClassName: nfs-client accessModes: - ReadWriteMany resources: diff --git a/charts/nfs-subdir-external-provisioner/Chart.yaml b/charts/nfs-subdir-external-provisioner/Chart.yaml index 58d3174a..1580608e 100644 --- a/charts/nfs-subdir-external-provisioner/Chart.yaml +++ b/charts/nfs-subdir-external-provisioner/Chart.yaml @@ -3,7 +3,7 @@ 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.14 +version: 4.0.16 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 c131f362..ed2bd84d 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -30,7 +30,7 @@ $ helm install my-release nfs-subdir-external-provisioner/nfs-subdir-external-pr --set nfs.path=/exported/path ``` -The command deploys the given storage class in the default configuration. It can be used afterswards to provision persistent volumes. The [configuration](#configuration) section lists the parameters that can be configured during installation. +The command deploys the given storage class in the default configuration. It can be used afterwards to provision persistent volumes. The [configuration](#configuration) section lists the parameters that can be configured during installation. > **Tip**: List all releases using `helm list` @@ -84,3 +84,15 @@ The following tables lists the configurable parameters of this chart and their d | `affinity` | Affinity settings | `{}` | | `tolerations` | List of node taints to tolerate | `[]` | | `labels` | Additional labels for any resource created | `{}` | + +## Install Multiple Provisioners + +It is possible to install more than one provisioner in your cluster to have access to multiple nfs servers and/or multiple exports from a single nfs server. Each provisioner must have a different `storageClass.provisionerName` and therefore a different `storageClass.name`. For example: + +```console +helm install second-nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \ + --set nfs.server=y.y.y.y \ + --set nfs.path=/other/exported/path \ + --set storageClass.name=second-nfs-client \ + --set storageClass.provisionerName=k8s-sigs.io/second-nfs-subdir-external-provisioner +``` diff --git a/deploy/class.yaml b/deploy/class.yaml index d26ffb3b..fbbf0869 100644 --- a/deploy/class.yaml +++ b/deploy/class.yaml @@ -1,7 +1,7 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: - name: managed-nfs-storage + name: nfs-client provisioner: k8s-sigs.io/nfs-subdir-external-provisioner # or choose another name, must match deployment's env PROVISIONER_NAME' parameters: archiveOnDelete: "false" diff --git a/deploy/objects/class.yaml b/deploy/objects/class.yaml index d26ffb3b..fbbf0869 100644 --- a/deploy/objects/class.yaml +++ b/deploy/objects/class.yaml @@ -1,7 +1,7 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: - name: managed-nfs-storage + name: nfs-client provisioner: k8s-sigs.io/nfs-subdir-external-provisioner # or choose another name, must match deployment's env PROVISIONER_NAME' parameters: archiveOnDelete: "false" diff --git a/deploy/test-claim.yaml b/deploy/test-claim.yaml index 72218eb7..4715972e 100644 --- a/deploy/test-claim.yaml +++ b/deploy/test-claim.yaml @@ -3,7 +3,7 @@ apiVersion: v1 metadata: name: test-claim spec: - storageClassName: managed-nfs-storage + storageClassName: nfs-client accessModes: - ReadWriteMany resources: From aa7de735187cf28d9169bc7bee5015ce80da6c5b Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Sun, 6 Feb 2022 00:14:48 +0200 Subject: [PATCH 2/2] Update README.md --- 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 ed2bd84d..411703dd 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -87,7 +87,7 @@ The following tables lists the configurable parameters of this chart and their d ## Install Multiple Provisioners -It is possible to install more than one provisioner in your cluster to have access to multiple nfs servers and/or multiple exports from a single nfs server. Each provisioner must have a different `storageClass.provisionerName` and therefore a different `storageClass.name`. For example: +It is possible to install more than one provisioner in your cluster to have access to multiple nfs servers and/or multiple exports from a single nfs server. Each provisioner must have a different `storageClass.provisionerName` and a different `storageClass.name`. For example: ```console helm install second-nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \