From 0869cb9ec6a8039f77835d20e9317589bfa2b051 Mon Sep 17 00:00:00 2001 From: John Call Date: Thu, 4 Mar 2021 12:26:13 -0700 Subject: [PATCH 1/4] Fix README.md The previous `oc adm policy add-role-to-user use-scc-hostmount-anyuid` command was incorrect. Replacing it with the correct one --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8159deae..6582dd86 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ $ NAMESPACE=`oc project -q` $ sed -i'' "s/namespace:.*/namespace: $NAMESPACE/g" ./deploy/rbac.yaml $ oc create -f deploy/rbac.yaml $ oc create role use-scc-hostmount-anyuid --verb=use --resource=scc --resource-name=hostmount-anyuid -n $NAMESPACE -$ oc adm policy add-role-to-user use-scc-hostmount-anyuid system:serviceaccount:$NAMESPACE:nfs-client-provisioner +$ oc adm policy add-scc-to-user hostmount-anyuid system:serviceaccount:$NAMESPACE:nfs-client-provisioner ``` **Step 4: Configure the NFS subdir external provisioner** From d8db2d111e5b81e7a3538e5ac2a1a5c4cecdcc6f Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Sun, 25 Apr 2021 22:43:05 +0300 Subject: [PATCH 2/4] Update the README file with stable image repository Signed-off-by: Yonatan Kahana --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1d46f162..b8be8ee5 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **NFS subdir external provisioner** is an automatic provisioner that use your _existing and already configured_ NFS server to support dynamic provisioning of Kubernetes Persistent Volumes via Persistent Volume Claims. Persistent volumes are provisioned as `${namespace}-${pvcName}-${pvName}`. Note: This repository is migrated from https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client. As part of the migration: -- The container image name and repository has changed to `gcr.io/k8s-staging-sig-storage` and `nfs-subdir-external-provisioner` respectively. +- The container image name and repository has changed to `k8s.gcr.io/sig-storage` and `nfs-subdir-external-provisioner` respectively. - To maintain backward compatibility with earlier deployment files, the naming of NFS Client Provisioner is retained as `nfs-client-provisioner` in the deployment YAMLs. - One of the pending areas for development on this repository is to add automated e2e tests. If you would like to contribute, please raise an issue or reach us on the Kubernetes slack #sig-storage channel. From 09a32a7aad7405e7c6f4b0ca9c16fc24cc0a1e30 Mon Sep 17 00:00:00 2001 From: John Call Date: Tue, 11 May 2021 10:43:59 -0600 Subject: [PATCH 3/4] also remove the command that creates an unnecessary SCC --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 6582dd86..c870c1f3 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,6 @@ On OpenShift the service account used to bind volumes does not have the necessar $ NAMESPACE=`oc project -q` $ sed -i'' "s/namespace:.*/namespace: $NAMESPACE/g" ./deploy/rbac.yaml $ oc create -f deploy/rbac.yaml -$ oc create role use-scc-hostmount-anyuid --verb=use --resource=scc --resource-name=hostmount-anyuid -n $NAMESPACE $ oc adm policy add-scc-to-user hostmount-anyuid system:serviceaccount:$NAMESPACE:nfs-client-provisioner ``` From 23c664fd5466c117a5373a7becfd986b2013d48f Mon Sep 17 00:00:00 2001 From: Robin Elfrink Date: Wed, 2 Jun 2021 13:11:21 +0200 Subject: [PATCH 4/4] chart: Add option to set nfs root volume name. Signed-off-by: Robin Elfrink --- charts/nfs-subdir-external-provisioner/Chart.yaml | 2 +- charts/nfs-subdir-external-provisioner/README.md | 1 + .../nfs-subdir-external-provisioner/templates/deployment.yaml | 4 ++-- charts/nfs-subdir-external-provisioner/values.yaml | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/charts/nfs-subdir-external-provisioner/Chart.yaml b/charts/nfs-subdir-external-provisioner/Chart.yaml index 609562c9..a6547ab6 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.10 +version: 4.0.11 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 61ea6279..0055e79e 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -70,6 +70,7 @@ The following tables lists the configurable parameters of this chart and their d | `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 | +| `nfs.volumeName` | Volume name used inside the pods | `nfs-subdir-external-provisioner-root` | | `resources` | Resources required (e.g. CPU, memory) | `{}` | | `rbac.create` | Use Role-based Access Control | `true` | | `podSecurityPolicy.enabled` | Create & use Pod Security Policy resources | `false` | diff --git a/charts/nfs-subdir-external-provisioner/templates/deployment.yaml b/charts/nfs-subdir-external-provisioner/templates/deployment.yaml index 6999b748..12ba9b7d 100644 --- a/charts/nfs-subdir-external-provisioner/templates/deployment.yaml +++ b/charts/nfs-subdir-external-provisioner/templates/deployment.yaml @@ -44,7 +44,7 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} volumeMounts: - - name: nfs-subdir-external-provisioner-root + - name: {{ .Values.nfs.volumeName }} mountPath: /persistentvolumes env: - name: PROVISIONER_NAME @@ -62,7 +62,7 @@ spec: {{ toYaml . | indent 12 }} {{- end }} volumes: - - name: nfs-subdir-external-provisioner-root + - name: {{ .Values.nfs.volumeName }} {{- if .Values.buildMode }} emptyDir: {} {{- else if .Values.nfs.mountOptions }} diff --git a/charts/nfs-subdir-external-provisioner/values.yaml b/charts/nfs-subdir-external-provisioner/values.yaml index 211d6752..0a4f03dc 100644 --- a/charts/nfs-subdir-external-provisioner/values.yaml +++ b/charts/nfs-subdir-external-provisioner/values.yaml @@ -11,6 +11,7 @@ nfs: server: path: /nfs-storage mountOptions: + volumeName: nfs-subdir-external-provisioner-root # For creating the StorageClass automatically: storageClass: