From aea8ecafbac963c1be050831c5b05200942bdbf5 Mon Sep 17 00:00:00 2001 From: Yonatan Kahana Date: Sat, 16 Jan 2021 14:41:38 +0200 Subject: [PATCH] Update the README and deploy objects with better class names as examples Signed-off-by: Yonatan Kahana --- README.md | 16 ++++++++-------- deploy/class.yaml | 2 +- deploy/deployment-arm.yaml | 2 +- deploy/deployment.yaml | 2 +- deploy/objects/class.yaml | 2 +- deploy/objects/deployment-arm.yaml | 2 +- deploy/objects/deployment.yaml | 2 +- deploy/test-claim.yaml | 2 -- 8 files changed, 14 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index db570747..6b1008bd 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ spec: mountPath: /persistentvolumes env: - name: PROVISIONER_NAME - value: fuseim.pri/ifs + value: nfs-subdir-external-provisioner - name: NFS_SERVER value: - name: NFS_PATH @@ -119,7 +119,7 @@ spec: path: /var/nfs ``` -You may also want to change the PROVISIONER_NAME above from `fuseim.pri/ifs` to something more descriptive like `nfs-storage`, but if you do remember to also change the PROVISIONER_NAME in the storage class definition below. +You may also want to change the PROVISIONER_NAME above from `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. To disable leader election, define an env variable named ENABLE_LEADER_ELECTION and set its value to false. @@ -129,8 +129,8 @@ To disable leader election, define an env variable named ENABLE_LEADER_ELECTION | Name | Description | Default | | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------: | -| onDelete | If it exists and has a delete value, delete the directory, if it exists and has a retain value, save the directory. | will be archived with name on the share: `archived-+volume.Name` | -| 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-+volume.Name` | +| onDelete | If it exists and has a delete value, delete the directory, if it exists and has a retain value, save the directory. | will be archived with name on the share: `archived-` | +| 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: @@ -140,7 +140,7 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: managed-nfs-storage -provisioner: fuseim.pri/ifs # or choose another name, must match deployment's env PROVISIONER_NAME' +provisioner: 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. onDelete: delete @@ -166,7 +166,7 @@ Now check the folder has been deleted. **Step 7: Deploying your own PersistentVolumeClaims** -To deploy your own PVC, make sure that you have the correct `storage-class` as indicated by your `deploy/class.yaml` file. +To deploy your own PVC, make sure that you have the correct `storageClassName` as indicated by your `deploy/class.yaml` file. For example: @@ -175,10 +175,10 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: name: test-claim - annotations: - volume.beta.kubernetes.io/storage-class: "managed-nfs-storage" + 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 accessModes: - ReadWriteMany resources: diff --git a/deploy/class.yaml b/deploy/class.yaml index 4d3b4805..64e7bf1a 100644 --- a/deploy/class.yaml +++ b/deploy/class.yaml @@ -2,6 +2,6 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: managed-nfs-storage -provisioner: fuseim.pri/ifs # or choose another name, must match deployment's env PROVISIONER_NAME' +provisioner: nfs-subdir-external-provisioner # or choose another name, must match deployment's env PROVISIONER_NAME' parameters: archiveOnDelete: "false" diff --git a/deploy/deployment-arm.yaml b/deploy/deployment-arm.yaml index 6ee30150..0b6b41d6 100644 --- a/deploy/deployment-arm.yaml +++ b/deploy/deployment-arm.yaml @@ -27,7 +27,7 @@ spec: mountPath: /persistentvolumes env: - name: PROVISIONER_NAME - value: fuseim.pri/ifs + value: nfs-subdir-external-provisioner - name: NFS_SERVER value: 10.10.10.60 - name: NFS_PATH diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index 0ec9c4ed..ec4c0d58 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -27,7 +27,7 @@ spec: mountPath: /persistentvolumes env: - name: PROVISIONER_NAME - value: fuseim.pri/ifs + value: nfs-subdir-external-provisioner - name: NFS_SERVER value: 10.10.10.60 - name: NFS_PATH diff --git a/deploy/objects/class.yaml b/deploy/objects/class.yaml index 4d3b4805..64e7bf1a 100644 --- a/deploy/objects/class.yaml +++ b/deploy/objects/class.yaml @@ -2,6 +2,6 @@ apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: managed-nfs-storage -provisioner: fuseim.pri/ifs # or choose another name, must match deployment's env PROVISIONER_NAME' +provisioner: nfs-subdir-external-provisioner # or choose another name, must match deployment's env PROVISIONER_NAME' parameters: archiveOnDelete: "false" diff --git a/deploy/objects/deployment-arm.yaml b/deploy/objects/deployment-arm.yaml index 9cced7e5..ccf81fe2 100644 --- a/deploy/objects/deployment-arm.yaml +++ b/deploy/objects/deployment-arm.yaml @@ -20,7 +20,7 @@ spec: mountPath: /persistentvolumes env: - name: PROVISIONER_NAME - value: fuseim.pri/ifs + value: nfs-subdir-external-provisioner - name: NFS_SERVER value: 10.10.10.60 - name: NFS_PATH diff --git a/deploy/objects/deployment.yaml b/deploy/objects/deployment.yaml index 1b793676..7b860cf1 100644 --- a/deploy/objects/deployment.yaml +++ b/deploy/objects/deployment.yaml @@ -20,7 +20,7 @@ spec: mountPath: /persistentvolumes env: - name: PROVISIONER_NAME - value: fuseim.pri/ifs + value: nfs-subdir-external-provisioner - name: NFS_SERVER value: 10.10.10.60 - name: NFS_PATH diff --git a/deploy/test-claim.yaml b/deploy/test-claim.yaml index 9669e8f6..72218eb7 100644 --- a/deploy/test-claim.yaml +++ b/deploy/test-claim.yaml @@ -2,8 +2,6 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: name: test-claim - annotations: - volume.beta.kubernetes.io/storage-class: "managed-nfs-storage" spec: storageClassName: managed-nfs-storage accessModes: