From 305c904e3784642071a2c542ea5226cb7db57238 Mon Sep 17 00:00:00 2001 From: panigs7 <92028646+panigs7@users.noreply.github.com> Date: Thu, 17 Aug 2023 14:57:04 +0530 Subject: [PATCH] Volume limit support in CSI Powerflex Driver (#748) * volume limit support in CSI Powerflex Driver * Incorporate review comments --- content/docs/csidriver/features/powerflex.md | 11 +++++++++++ .../docs/csidriver/installation/helm/powerflex.md | 1 + .../csidriver/installation/operator/powerflex.md | 12 ++++++++++-- content/docs/csidriver/release/powerflex.md | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/content/docs/csidriver/features/powerflex.md b/content/docs/csidriver/features/powerflex.md index 3b7d2db98d..cd8786dbad 100644 --- a/content/docs/csidriver/features/powerflex.md +++ b/content/docs/csidriver/features/powerflex.md @@ -750,3 +750,14 @@ node: > NOTE: Currently, the CSI-PowerFlex driver only supports GUID for the restricted SDC mode. If SDC approval is denied, then provisioning of the volume will not be attempted and an appropriate error message is reported in the logs/events so the user is informed. + +## Volume Limit + +The CSI Driver for Dell PowerFlex allows users to specify the maximum number of PowerFlex volumes that can be used in a node. + +The user can set the volume limit for a node by creating a node label `max-vxflexos-volumes-per-node` and specifying the volume limit for that node. +
`kubectl label node max-vxflexos-volumes-per-node=` + +The user can also set the volume limit for all the nodes in the cluster by specifying the same to `maxVxflexosVolumesPerNode` attribute in values.yaml file. + +>**NOTE:**
To reflect the changes after setting the value either via node label or in values.yaml file, user has to bounce the driver controller and node pods using the command `kubectl get pods -n vxflexos --no-headers=true | awk '/vxflexos-/{print $1}'| xargs kubectl delete -n vxflexos pod`.

If the value is set both by node label and values.yaml file then node label value will get the precedence and user has to remove the node label in order to reflect the values.yaml value.

The default value of `maxVxflexosVolumesPerNode` is 0.

If `maxVxflexosVolumesPerNode` is set to zero, then Container Orchestration decides how many volumes of this type can be published by the controller to the node.

The volume limit specified to `maxVxflexosVolumesPerNode` attribute is applicable to all the nodes in the cluster for which node label `max-vxflexos-volumes-per-node` is not set. diff --git a/content/docs/csidriver/installation/helm/powerflex.md b/content/docs/csidriver/installation/helm/powerflex.md index fe6a7b131c..81b7d38bf1 100644 --- a/content/docs/csidriver/installation/helm/powerflex.md +++ b/content/docs/csidriver/installation/helm/powerflex.md @@ -164,6 +164,7 @@ Use the below command to replace or update the secret: | enablesnapshotcgdelete | A boolean that, when enabled, will delete all snapshots in a consistency group everytime a snap in the group is deleted. | Yes | false | | enablelistvolumesnapshot | A boolean that, when enabled, will allow list volume operation to include snapshots (since creating a volume from a snap actually results in a new snap). It is recommend this be false unless instructed otherwise. | Yes | false | | allowRWOMultiPodAccess | Setting allowRWOMultiPodAccess to "true" will allow multiple pods on the same node to access the same RWO volume. This behavior conflicts with the CSI specification version 1.3. NodePublishVolume description that requires an error to be returned in this case. However, some other CSI drivers support this behavior and some customers desire this behavior. Customers use this option at their own risk. | Yes | false | +| maxVxflexosVolumesPerNode | Maximum number of volumes that controller can publish to the node. | No | 0 | | **controller** | This section allows the configuration of controller-specific parameters. To maximize the number of available nodes for controller pods, see this section. For more details on the new controller pod configurations, see the [Features section](../../../features/powerflex#controller-ha) for Powerflex specifics. | - | - | | volumeNamePrefix | Set so that volumes created by the driver have a default prefix. If one PowerFlex/VxFlex OS system is servicing several different Kubernetes installations or users, these prefixes help you distinguish them. | Yes | "k8s" | | controllerCount | Set to deploy multiple controller instances. If the controller count is greater than the number of available nodes, excess pods remain in a pending state. It should be greater than 0. You can increase the number of available nodes by configuring the "controller" section in your values.yaml. For more details on the new controller pod configurations, see the [Features section](../../../features/powerflex#controller-ha) for Powerflex specifics. | Yes | 2 | diff --git a/content/docs/csidriver/installation/operator/powerflex.md b/content/docs/csidriver/installation/operator/powerflex.md index fa71cc0561..18699e66af 100644 --- a/content/docs/csidriver/installation/operator/powerflex.md +++ b/content/docs/csidriver/installation/operator/powerflex.md @@ -170,13 +170,13 @@ For detailed PowerFlex installation procedure, see the _Dell PowerFlex Deploymen namespace: test-vxflexos spec: driver: - configVersion: v2.6.0 + configVersion: v2.8.0 replicas: 1 dnsPolicy: ClusterFirstWithHostNet forceUpdate: false fsGroupPolicy: File common: - image: "dellemc/csi-vxflexos:v2.7.0" + image: "dellemc/csi-vxflexos:v2.8.0" imagePullPolicy: IfNotPresent envs: - name: X_CSI_VXFLEXOS_ENABLELISTVOLUMESNAPSHOT @@ -222,6 +222,14 @@ For detailed PowerFlex installation procedure, see the _Dell PowerFlex Deploymen - name: X_CSI_HEALTH_MONITOR_ENABLED value: "false" + # X_CSI_MAX_VOLUMES_PER_NODE: Defines the maximum PowerFlex volumes that can be created per node + # Allowed values: Any value greater than or equal to 0 + # If value is 0 then the orchestrator decides how many volumes can be published by the controller to + # the node + # Default value: "0" + - name: X_CSI_MAX_VOLUMES_PER_NODE + value: "0" + initContainers: - image: dellemc/sdc:3.6.0.6 imagePullPolicy: IfNotPresent diff --git a/content/docs/csidriver/release/powerflex.md b/content/docs/csidriver/release/powerflex.md index 34edff540d..6b62ee74e7 100644 --- a/content/docs/csidriver/release/powerflex.md +++ b/content/docs/csidriver/release/powerflex.md @@ -7,6 +7,7 @@ description: Release notes for PowerFlex CSI driver ### New Features/Changes - [Added support for OpenShift 4.13](https://github.com/dell/csm/issues/724) +- [Enabled volume limits feature](https://github.com/dell/csm/issues/878) ### Fixed Issues -