From cd455654801ad25d4c12449212fe9279e7d6561a Mon Sep 17 00:00:00 2001 From: kmova Date: Fri, 5 Feb 2021 05:27:02 +0000 Subject: [PATCH 1/4] chore(release): update container images to 4.0.0 - Update to the prow generated container images pushed to grc.io - Set the tag version to 4.0.0 - Update the helm chart version to 4.0.0 Signed-off-by: kmova --- CHANGELOG.md | 4 ++-- README.md | 4 ++-- charts/nfs-subdir-external-provisioner/Chart.yaml | 6 +++--- charts/nfs-subdir-external-provisioner/README.md | 6 ++---- charts/nfs-subdir-external-provisioner/values.yaml | 4 ++-- deploy/deployment-arm.yaml | 2 +- deploy/deployment.yaml | 6 +++--- deploy/objects/deployment-arm.yaml | 2 +- deploy/objects/deployment.yaml | 2 +- 9 files changed, 17 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c080ce..6d2ddae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# Unreleased +# 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) - Fill in rbac.yaml with ServiceAccount manifest (https://github.com/kubernetes-retired/external-storage/pull/1060, https://github.com/kubernetes-retired/external-storage/pull/1179) @@ -42,4 +42,4 @@ - Fix issue 149 - nfs-client-provisioner create folder with 755, not 777 (https://github.com/kubernetes-incubator/external-storage/pull/150) # v1 -- Initial release \ No newline at end of file +- Initial release diff --git a/README.md b/README.md index a41724c..e467616 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Note: This repository is being migrated from https://github.com/kubernetes-incub make build make container # `nfs-subdir-external-provisioner:latest` will be created. -# To upload this to your customer registry, say `quay.io/myorg`, you can use +# To upload this to your custom registry, say `quay.io/myorg`, you can use # docker tag nfs-subdir-external-provisioner:latest quay.io/myorg/nfs-subdir-external-provisioner:latest # docker push quay.io/myorg/nfs-subdir-external-provisioner:latest ``` @@ -100,7 +100,7 @@ spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner - image: quay.io/external_storage/nfs-client-provisioner:latest + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0 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 7aecc25..4b89555 100644 --- a/charts/nfs-subdir-external-provisioner/Chart.yaml +++ b/charts/nfs-subdir-external-provisioner/Chart.yaml @@ -1,10 +1,10 @@ apiVersion: v1 -appVersion: 3.1.0 +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: 3.0.0 -kubeVersion: ">=1.9.0-0 <1.20.0-0" +version: 4.0.0 +kubeVersion: ">=1.9.0-0" sources: - https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner keywords: diff --git a/charts/nfs-subdir-external-provisioner/README.md b/charts/nfs-subdir-external-provisioner/README.md index 29aeb56..57b84dd 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -11,8 +11,6 @@ $ helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/n --set nfs.path=/exported/path ``` -For **arm** deployments set `image.repository` to `--set image.repository=quay.io/external_storage/nfs-client-provisioner-arm` - ## Introduction This charts installs custom [storage class](https://kubernetes.io/docs/concepts/storage/storage-classes/) into a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. It also installs a [NFS client provisioner](https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner) into the cluster which dynamically creates persistent volumes from single NFS share. @@ -54,8 +52,8 @@ 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 | `quay.io/external_storage/nfs-client-provisioner` | -| `image.tag` | Version of provisioner image | `v3.1.0-k8s1.11` | +| `image.repository` | Provisioner image | `gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner` | +| `image.tag` | Version of provisioner image | `v4.0.0` | | `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 6446308..0b5e4e5 100644 --- a/charts/nfs-subdir-external-provisioner/values.yaml +++ b/charts/nfs-subdir-external-provisioner/values.yaml @@ -2,8 +2,8 @@ replicaCount: 1 strategyType: Recreate image: - repository: quay.io/external_storage/nfs-client-provisioner - tag: v3.1.0-k8s1.11 + repository: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner + tag: v4.0.0 pullPolicy: IfNotPresent nfs: diff --git a/deploy/deployment-arm.yaml b/deploy/deployment-arm.yaml index 0b3f0bc..ec19d92 100644 --- a/deploy/deployment-arm.yaml +++ b/deploy/deployment-arm.yaml @@ -21,7 +21,7 @@ spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner - image: quay.io/external_storage/nfs-client-provisioner-arm:latest + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0-rc2 volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index d37f43a..a76f633 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -21,7 +21,7 @@ spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner - image: quay.io/external_storage/nfs-client-provisioner:latest + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0 volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes @@ -29,11 +29,11 @@ spec: - name: PROVISIONER_NAME value: k8s-sigs.io/nfs-subdir-external-provisioner - name: NFS_SERVER - value: 10.10.10.60 + value: 10.3.243.101 - name: NFS_PATH value: /ifs/kubernetes volumes: - name: nfs-client-root nfs: - server: 10.10.10.60 + server: 10.3.243.101 path: /ifs/kubernetes diff --git a/deploy/objects/deployment-arm.yaml b/deploy/objects/deployment-arm.yaml index d12f203..7519f51 100644 --- a/deploy/objects/deployment-arm.yaml +++ b/deploy/objects/deployment-arm.yaml @@ -14,7 +14,7 @@ spec: serviceAccountName: nfs-client-provisioner containers: - name: nfs-client-provisioner - image: quay.io/external_storage/nfs-client-provisioner-arm:latest + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0 volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes diff --git a/deploy/objects/deployment.yaml b/deploy/objects/deployment.yaml index 8b153a1..7519f51 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: quay.io/external_storage/nfs-client-provisioner:latest + image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0 volumeMounts: - name: nfs-client-root mountPath: /persistentvolumes From 607385ebee7349eaccd14cc8d8aa94955c6a503a Mon Sep 17 00:00:00 2001 From: kmova Date: Sun, 7 Feb 2021 16:13:36 +0000 Subject: [PATCH 2/4] remove referances to deployment-arm Signed-off-by: kmova --- README.md | 44 +++++++++++++++--------------- deploy/deployment-arm.yaml | 39 -------------------------- deploy/objects/deployment-arm.yaml | 32 ---------------------- 3 files changed, 22 insertions(+), 93 deletions(-) delete mode 100644 deploy/deployment-arm.yaml delete mode 100644 deploy/objects/deployment-arm.yaml diff --git a/README.md b/README.md index e467616..45fcdff 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,10 @@ -# Kubernetes NFS-Client Provisioner +# Kubernetes NFS Subdir External Provisioner -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}`. +**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 being migrated from https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client. Some of the following instructions will be updated once the migration is completed. To test container image built from this repository, you will have to build and push the nfs-client-provisioner image using the following instructions. +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 ``. To maintain backward compatibility with earlier deployment files, the naming of NFS Client Provisioner is retained. -```sh -make build -make container -# `nfs-subdir-external-provisioner:latest` will be created. -# To upload this to your custom registry, say `quay.io/myorg`, you can use -# docker tag nfs-subdir-external-provisioner:latest quay.io/myorg/nfs-subdir-external-provisioner:latest -# docker push quay.io/myorg/nfs-subdir-external-provisioner:latest -``` - -## How to deploy nfs-client to your cluster - -**nfs-client** 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}`. +## How to deploy NFS Subdir External Provisioner to your cluster To note again, you must _already_ have an NFS Server. @@ -38,7 +27,7 @@ $ helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/n Make sure your NFS server is accessible from your Kubernetes cluster and get the information you need to connect to it. At a minimum you will need its hostname. -**Step 2: Get the NFS-Client Provisioner files** +**Step 2: Get the NFS Subdir External Provisioner files** To setup the provisioner you will download a set of YAML files, edit them to add your NFS server's connection information and then apply each with the `kubectl` / `oc` command. @@ -72,11 +61,9 @@ $ oc create role use-scc-hostmount-anyuid --verb=use --resource=scc --resource-n $ oc adm policy add-role-to-user use-scc-hostmount-anyuid system:serviceaccount:$NAMESPACE:nfs-client-provisioner ``` -**Step 4: Configure the NFS-Client provisioner** +**Step 4: Configure the NFS subdir external provisioner** -Note: To deploy to an ARM-based environment, use: `deploy/deployment-arm.yaml` instead, otherwise use `deploy/deployment.yaml`. - -You must edit the provisioner's deployment file to specify the correct location of your nfs-client-provisioner container image. +You must edit the provisioner's deployment file to specify the correct location of your nfs-subdir-external-provisioner container image. Next you must edit the provisioner's deployment file to add connection information for your NFS server. Edit `deploy/deployment.yaml` and replace the two occurences of with your server's hostname. @@ -132,7 +119,7 @@ To disable leader election, define an env variable named ENABLE_LEADER_ELECTION | archiveOnDelete | If it exists and has a false value, delete the directory. if `onDelete` exists, `archiveOnDelete` will be ignored. | will be archived with name on the share: `archived-` | | pathPattern | Specifies a template for creating a directory path via PVC metadata's such as labels, annotations, name or namespace. To specify metadata use `${.PVC.}`: `${PVC.namespace}` | n/a | -This is `deploy/class.yaml` which defines the NFS-Client's Kubernetes Storage Class: +This is `deploy/class.yaml` which defines the NFS subdir external provisioner's Kubernetes Storage Class: ```yaml apiVersion: storage.k8s.io/v1 @@ -147,7 +134,7 @@ parameters: **Step 6: Finally, test your environment!** -Now we'll test your NFS provisioner. +Now we'll test your NFS subdir external provisioner. Deploy: @@ -185,6 +172,19 @@ spec: storage: 1Mi ``` +# Build and publish your own container image + +To build your own custom container image from this repository, you will have to build and push the nfs-subdir-external-provisioner image using the following instructions. + +```sh +make build +make container +# `nfs-subdir-external-provisioner:latest` will be created. +# To upload this to your custom registry, say `quay.io/myorg`, you can use +# docker tag nfs-subdir-external-provisioner:latest quay.io/myorg/nfs-subdir-external-provisioner:latest +# docker push quay.io/myorg/nfs-subdir-external-provisioner:latest +``` + # Build and publish with GitHub Actions In a forked repository you can use GitHub Actions pipeline defined in [.github/workflows/release.yml](.github/workflows/release.yml). The pipeline builds Docker images for `linux/amd64`, `linux/arm64`, and `linux/arm/v7` platforms and publishes them using a multi-arch manifest. The pipeline is triggered when you add a tag like `gh-v{major}.{minor}.{patch}` to your commit and push it to GitHub. The tag is used for generating Docker image tags: `latest`, `{major}`, `{major}:{minor}`, `{major}:{minor}:{patch}`. diff --git a/deploy/deployment-arm.yaml b/deploy/deployment-arm.yaml deleted file mode 100644 index ec19d92..0000000 --- a/deploy/deployment-arm.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: nfs-client-provisioner - labels: - app: nfs-client-provisioner - # replace with namespace where provisioner is deployed - namespace: default -spec: - replicas: 1 - strategy: - type: Recreate - selector: - matchLabels: - app: nfs-client-provisioner - template: - metadata: - labels: - app: nfs-client-provisioner - spec: - serviceAccountName: nfs-client-provisioner - containers: - - name: nfs-client-provisioner - image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0-rc2 - volumeMounts: - - name: nfs-client-root - mountPath: /persistentvolumes - env: - - name: PROVISIONER_NAME - value: k8s-sigs.io/nfs-subdir-external-provisioner - - name: NFS_SERVER - value: 10.10.10.60 - - name: NFS_PATH - value: /ifs/kubernetes - volumes: - - name: nfs-client-root - nfs: - server: 10.10.10.60 - path: /ifs/kubernetes diff --git a/deploy/objects/deployment-arm.yaml b/deploy/objects/deployment-arm.yaml deleted file mode 100644 index 7519f51..0000000 --- a/deploy/objects/deployment-arm.yaml +++ /dev/null @@ -1,32 +0,0 @@ -kind: Deployment -apiVersion: extensions/v1beta1 -metadata: - name: nfs-client-provisioner -spec: - replicas: 1 - strategy: - type: Recreate - template: - metadata: - labels: - app: nfs-client-provisioner - spec: - serviceAccountName: nfs-client-provisioner - containers: - - name: nfs-client-provisioner - image: gcr.io/k8s-staging-sig-storage/nfs-subdir-external-provisioner:v4.0.0 - volumeMounts: - - name: nfs-client-root - mountPath: /persistentvolumes - env: - - name: PROVISIONER_NAME - value: k8s-sigs.io/nfs-subdir-external-provisioner - - name: NFS_SERVER - value: 10.10.10.60 - - name: NFS_PATH - value: /ifs/kubernetes - volumes: - - name: nfs-client-root - nfs: - server: 10.10.10.60 - path: /ifs/kubernetes From a1927e5c2efe3fb25e1b8994a7ffbb99667eea50 Mon Sep 17 00:00:00 2001 From: kmova Date: Thu, 11 Feb 2021 02:43:02 +0000 Subject: [PATCH 3/4] resolve review comments on README Signed-off-by: kmova --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 45fcdff..dd7bacd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,10 @@ **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 ``. To maintain backward compatibility with earlier deployment files, the naming of NFS Client Provisioner is retained. +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. +- 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. ## How to deploy NFS Subdir External Provisioner to your cluster @@ -63,7 +66,7 @@ $ oc adm policy add-role-to-user use-scc-hostmount-anyuid system:serviceaccount: **Step 4: Configure the NFS subdir external provisioner** -You must edit the provisioner's deployment file to specify the correct location of your nfs-subdir-external-provisioner container image. +If you would like to use a custom built nfs-subdir-external-provisioner image, you must edit the provisioner's deployment file to specify the correct location of your `nfs-client-provisioner` container image. Next you must edit the provisioner's deployment file to add connection information for your NFS server. Edit `deploy/deployment.yaml` and replace the two occurences of with your server's hostname. @@ -105,7 +108,7 @@ spec: path: /var/nfs ``` -You may also want to change the PROVISIONER_NAME above from `k8s-sigs.io/nfs-subdir-external-provisioner` to something more descriptive like `nfs-storage`, but if you do remember to also change the PROVISIONER_NAME in the storage class definition below. +Note: If you want to change the PROVISIONER_NAME above from `k8s-sigs.io/nfs-subdir-external-provisioner` to something else like `myorg/nfs-storage`, remember to also change the PROVISIONER_NAME in the storage class definition below. To disable leader election, define an env variable named ENABLE_LEADER_ELECTION and set its value to false. @@ -180,9 +183,10 @@ To build your own custom container image from this repository, you will have to make build make container # `nfs-subdir-external-provisioner:latest` will be created. -# To upload this to your custom registry, say `quay.io/myorg`, you can use -# docker tag nfs-subdir-external-provisioner:latest quay.io/myorg/nfs-subdir-external-provisioner:latest -# docker push quay.io/myorg/nfs-subdir-external-provisioner:latest +# Note: This will build a single-arch image that matches the machine on which container is built. +# To upload this to your custom registry, say `quay.io/myorg` and arch as amd64, you can use +# docker tag nfs-subdir-external-provisioner:latest quay.io/myorg/nfs-subdir-external-provisioner-amd64:latest +# docker push quay.io/myorg/nfs-subdir-external-provisioner-amd64:latest ``` # Build and publish with GitHub Actions @@ -201,3 +205,6 @@ The pipeline adds several labels: **Important:** * The pipeline performs the docker login command using `REGISTRY_USERNAME` and `REGISTRY_TOKEN` secrets, which have to be provided. * You also need to provide the `DOCKER_IMAGE` secret specifying your Docker image name, e.g., `quay.io/[username]/nfs-subdir-external-provisioner`. + + + From 3eb80593a9ec499bf8484ab19e67b4c3404061b9 Mon Sep 17 00:00:00 2001 From: kmova Date: Fri, 12 Feb 2021 00:13:49 +0000 Subject: [PATCH 4/4] update chart readme - required K8s version Signed-off-by: kmova --- 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 57b84dd..d9be524 100644 --- a/charts/nfs-subdir-external-provisioner/README.md +++ b/charts/nfs-subdir-external-provisioner/README.md @@ -17,7 +17,7 @@ This charts installs custom [storage class](https://kubernetes.io/docs/concepts/ ## Prerequisites -- Kubernetes >=1.9, <1.20 +- Kubernetes >=1.9 - Existing NFS Share ## Installing the Chart