From e8f517a04f2864f42d583642ca35a2912138ff4c Mon Sep 17 00:00:00 2001 From: Kshitija Kakde Date: Thu, 13 Apr 2023 14:59:55 +0530 Subject: [PATCH 1/4] nfs storageclass added --- samples/storageclass/storageclass-nfs.yaml | 96 ++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 samples/storageclass/storageclass-nfs.yaml diff --git a/samples/storageclass/storageclass-nfs.yaml b/samples/storageclass/storageclass-nfs.yaml new file mode 100644 index 00000000..bf995f03 --- /dev/null +++ b/samples/storageclass/storageclass-nfs.yaml @@ -0,0 +1,96 @@ +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: vxflexos-nfs +provisioner: csi-vxflexos.dellemc.com +# reclaimPolicy: PVs that are dynamically created by a StorageClass will have the reclaim policy specified here +# Allowed values: +# Reclaim: retain the PV after PVC deletion +# Delete: delete the PV after PVC deletion +# Optional: true +# Default value: Delete +reclaimPolicy: Delete +# allowVolumeExpansion: allows the users to resize the volume by editing the corresponding PVC object +# Allowed values: +# true: allow users to resize the PVC +# false: does not allow users to resize the PVC +# Optional: true +# Default value: false +allowVolumeExpansion: true +parameters: + # Storage pool to use on system + # Optional: false + storagepool: # Insert Storage pool + # Protection domain that storage pool above belongs to + # Needed if array has two storagepools that share the same name, but belong to different protection domains + # Optional: true + # Uncomment the line below if you want to use protectiondomain + # protectiondomain: # Insert Protection domain name + # System you would like this storage class to use + # Allowed values: one string for system ID + # Optional: false + systemID: # Insert System ID + # format options to pass to mkfs + # Allowed values: A string dictating the fs options you want passed + # Optional: true + # Uncomment the line below if you want to use mkfsFormatOption + # mkfsFormatOption: "" # Insert file system format option + # Filesytem type for volumes created by storageclass + # Default value: None if defaultFsType is not mentioned in values.yaml + # Else defaultFsType value mentioned in values.yaml + # will be used as default value + csi.storage.k8s.io/fstype: nfs + # Limit the volume network bandwidth + # Value is a positive number in granularity of 1024 Kbps; 0 = unlimited + # Allowed values: one string for bandwidth limit in Kbps + # Optional: false + # Uncomment the line below if you want to use bandwidthLimitInKbps + # bandwidthLimitInKbps: # Insert bandwidth limit in Kbps + # Limit the volume IOPS + # The number of IOPS must be greater than 10; 0 = unlimited + # Allowed values: one string for iops limit + # Optional: false + # Uncomment the line below if you want to use iopsLimit + # iopsLimit: # Insert iops limit +# volumeBindingMode determines how volume binding and dynamic provisioning should occur +# Allowed values: +# Immediate: volume binding and dynamic provisioning occurs once PVC is created +# WaitForFirstConsumer: delay the binding and provisioning of PV until a pod using the PVC is created. +# Optional: false +# Default value: WaitForFirstConsumer (required for topology section below) +# nasName: NAS server's name. If not specified, value from secret.yaml will be used + # Allowed values: string + # Optional: true + # Default value: None + nasName: "nas-server" + + # allowRoot: enables or disables root squashing (valid only for NFS) + # Allowed values: + # true: will allow root users to use their privileges + # false: will prevent root users on NFS clients from exercising root privileges on the NFS server + # Optional: true + # Default value: false + allowRoot: "false" + + # nfsAcls: enables setting permissions on NFS mount directory + # This value overrides the NFS ACL (nfsAcls) attribute of corresponding array config in secret, if present + # Permissions can be specified in two formats: + # 1) Unix mode (NFSv3) + # 2) NFSv4 ACLs (NFSv4) + # NFSv4 ACLs are supported on NFSv4 share only. + # Allowed values: + # 1) Unix mode: valid octal mode number + # Examples: "0777", "777", "0755" + # 2) NFSv4 acls: valid NFSv4 acls, seperated by comma + # Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy" + # Optional: true + # Default value: "0777" + # nfsAcls: "0777" + +volumeBindingMode: WaitForFirstConsumer +# allowedTopologies helps scheduling pods on worker nodes which match all of below expressions. +allowedTopologies: +- matchLabelExpressions: + - key: csi-vxflexos.dellemc.com/ # Insert System ID + values: + - csi-vxflexos.dellemc.com From a4187d0b2501da0637d6588c7e75203eaccad956 Mon Sep 17 00:00:00 2001 From: Kshitija Kakde Date: Fri, 14 Apr 2023 12:46:00 +0530 Subject: [PATCH 2/4] NFS changes added in values.yaml and config.yaml --- helm/csi-vxflexos/values.yaml | 20 ++++++++++++++++++++ samples/config.yaml | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/helm/csi-vxflexos/values.yaml b/helm/csi-vxflexos/values.yaml index 7ca1cab9..3b59c864 100644 --- a/helm/csi-vxflexos/values.yaml +++ b/helm/csi-vxflexos/values.yaml @@ -38,6 +38,11 @@ kubeletConfigDir: /var/lib/kubelet # Default value: none defaultFsType: ext4 +# externalAccess: allows to specify additional entries for hostAccess of NFS volumes. Both single IP address and subnet are valid entries. +# Allowed Values: x.x.x.x/xx or x.x.x.x +# Default Value: None +externalAccess: + # imagePullPolicy: Policy to determine if the image should be pulled prior to starting the container. # Allowed values: # Always: Always pull the image. @@ -46,6 +51,21 @@ defaultFsType: ext4 # Default value: None imagePullPolicy: IfNotPresent +# nfsAcls: enables setting permissions on NFS mount directory +# This value acts as default value for NFS ACL (nfsAcls), if not specified for an array config in secret +# Permissions can be specified in two formats: +# 1) Unix mode (NFSv3) +# 2) NFSv4 ACLs (NFSv4) +# NFSv4 ACLs are supported on NFSv4 share only. +# Allowed values: +# 1) Unix mode: valid octal mode number +# Examples: "0777", "777", "0755" +# 2) NFSv4 acls: valid NFSv4 acls, seperated by comma +# Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy" +# Optional: true +# Default value: "0777" +nfsAcls: "0777" + # "enablesnapshotcgdelete"- a boolean that, when enabled, will delete all snapshots in a consistency group # everytime a snap in the group is deleted # Allowed values: true, false diff --git a/samples/config.yaml b/samples/config.yaml index d3e6e330..8c2fd4ae 100644 --- a/samples/config.yaml +++ b/samples/config.yaml @@ -24,6 +24,27 @@ # defines the MDM(s) that SDC should register with on start. # Allowed values: a list of IP addresses or hostnames separated by comma. # Default value: none + + # nasName: what NAS should be used for NFS volumes + # Allowed Values: string - (name of NAS server) + # Default Value: None + nasName: "nas-server" + + # nfsAcls: enables setting permissions on NFS mount directory + # This value will be used if a storage class does not have the NFS ACL (nfsAcls) parameter specified + # Permissions can be specified in two formats: + # 1) Unix mode (NFSv3) + # 2) NFSv4 ACLs (NFSv4) + # NFSv4 ACLs are supported on NFSv4 share only. + # Allowed values: + # 1) Unix mode: valid octal mode number + # Examples: "0777", "777", "0755" + # 2) NFSv4 acls: valid NFSv4 acls, seperated by comma + # Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy" + # Optional: true + # Default value: "0777" + # nfsAcls: "0777" + mdm: "10.0.0.1,10.0.0.2" - username: "admin" password: "Password123" From e2581c7a9c359a6af868931efb08f08c7e74d375 Mon Sep 17 00:00:00 2001 From: Kshitija Kakde Date: Fri, 14 Apr 2023 16:55:34 +0530 Subject: [PATCH 3/4] review comments addressed --- samples/storageclass/storageclass-nfs.yaml | 47 +++++++++++----------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/samples/storageclass/storageclass-nfs.yaml b/samples/storageclass/storageclass-nfs.yaml index bf995f03..eedbc7b5 100644 --- a/samples/storageclass/storageclass-nfs.yaml +++ b/samples/storageclass/storageclass-nfs.yaml @@ -52,19 +52,14 @@ parameters: # Optional: false # Uncomment the line below if you want to use iopsLimit # iopsLimit: # Insert iops limit -# volumeBindingMode determines how volume binding and dynamic provisioning should occur -# Allowed values: -# Immediate: volume binding and dynamic provisioning occurs once PVC is created -# WaitForFirstConsumer: delay the binding and provisioning of PV until a pod using the PVC is created. -# Optional: false -# Default value: WaitForFirstConsumer (required for topology section below) -# nasName: NAS server's name. If not specified, value from secret.yaml will be used + + # nasName: NAS server's name. If not specified, value from secret.yaml will be used # Allowed values: string # Optional: true # Default value: None nasName: "nas-server" - # allowRoot: enables or disables root squashing (valid only for NFS) + # allowRoot: enables or disables root squashing (valid only for NFS) # Allowed values: # true: will allow root users to use their privileges # false: will prevent root users on NFS clients from exercising root privileges on the NFS server @@ -72,21 +67,27 @@ parameters: # Default value: false allowRoot: "false" - # nfsAcls: enables setting permissions on NFS mount directory - # This value overrides the NFS ACL (nfsAcls) attribute of corresponding array config in secret, if present - # Permissions can be specified in two formats: - # 1) Unix mode (NFSv3) - # 2) NFSv4 ACLs (NFSv4) - # NFSv4 ACLs are supported on NFSv4 share only. - # Allowed values: - # 1) Unix mode: valid octal mode number - # Examples: "0777", "777", "0755" - # 2) NFSv4 acls: valid NFSv4 acls, seperated by comma - # Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy" - # Optional: true - # Default value: "0777" - # nfsAcls: "0777" - + # nfsAcls: enables setting permissions on NFS mount directory + # This value overrides the NFS ACL (nfsAcls) attribute of corresponding array config in secret, if present + # Permissions can be specified in two formats: + # 1) Unix mode (NFSv3) + # 2) NFSv4 ACLs (NFSv4) + # NFSv4 ACLs are supported on NFSv4 share only. + # Allowed values: + # 1) Unix mode: valid octal mode number + # Examples: "0777", "777", "0755" + # 2) NFSv4 acls: valid NFSv4 acls, seperated by comma + # Examples: "A::OWNER@:RWX,A::GROUP@:RWX", "A::OWNER@:rxtncy" + # Optional: true + # Default value: "0777" + # nfsAcls: "0777" + +# volumeBindingMode determines how volume binding and dynamic provisioning should occur +# Allowed values: +# Immediate: volume binding and dynamic provisioning occurs once PVC is created +# WaitForFirstConsumer: delay the binding and provisioning of PV until a pod using the PVC is created. +# Optional: false +# Default value: WaitForFirstConsumer (required for topology section below) volumeBindingMode: WaitForFirstConsumer # allowedTopologies helps scheduling pods on worker nodes which match all of below expressions. allowedTopologies: From f95204859d3a02eee1cd520cf5e7dab8f4aed6e2 Mon Sep 17 00:00:00 2001 From: Kshitija Kakde Date: Mon, 17 Apr 2023 10:13:03 +0530 Subject: [PATCH 4/4] review comments addressed --- helm/csi-vxflexos/values.yaml | 2 +- samples/config.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/helm/csi-vxflexos/values.yaml b/helm/csi-vxflexos/values.yaml index 3b59c864..e004654c 100644 --- a/helm/csi-vxflexos/values.yaml +++ b/helm/csi-vxflexos/values.yaml @@ -38,7 +38,7 @@ kubeletConfigDir: /var/lib/kubelet # Default value: none defaultFsType: ext4 -# externalAccess: allows to specify additional entries for hostAccess of NFS volumes. Both single IP address and subnet are valid entries. +# externalAccess: allows to specify additional entries for host to access NFS volumes. Both single IP address and subnet are valid entries. # Allowed Values: x.x.x.x/xx or x.x.x.x # Default Value: None externalAccess: diff --git a/samples/config.yaml b/samples/config.yaml index 8c2fd4ae..7c4f7875 100644 --- a/samples/config.yaml +++ b/samples/config.yaml @@ -24,7 +24,8 @@ # defines the MDM(s) that SDC should register with on start. # Allowed values: a list of IP addresses or hostnames separated by comma. # Default value: none - + + # NFS is only supported on arrays >= 4.0 # nasName: what NAS should be used for NFS volumes # Allowed Values: string - (name of NAS server) # Default Value: None