Add --node-deployment flag for distributed resizing#573
Add --node-deployment flag for distributed resizing#573mnencia wants to merge 1 commit intokubernetes-csi:masterfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mnencia The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @mnencia! |
|
Hi @mnencia. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
For CSI drivers deployed as DaemonSets managing node-local volumes, there is no central controller pod where a centralized external-resizer can run. The provisioner and snapshotter sidecars already support --node-deployment for this deployment model. This adds the same capability to the external-resizer. When enabled, each instance only processes resize requests for PVs whose nodeAffinity matches the local node. The flag requires NODE_NAME env var and is mutually exclusive with --leader-election. The filtering is applied in the controller (pvNeedResize and pvCanBeExpanded), covering both Resizer implementations without changes to the Resizer interface. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Add the csi-resizer sidecar with --node-deployment=true using a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, which has not yet been merged upstream. This commit is for local testing only and should not be submitted upstream until the resizer PR is merged. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
|
I have a working integration of this at |
Add the csi-resizer sidecar with --node-deployment=true using a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, which has not yet been merged upstream. This commit is for local testing only and should not be submitted upstream until the resizer PR is merged. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Replace the single-node StatefulSet csi-hostpath deployment with the distributed DaemonSet variant, which runs the CSI driver on every node with per-node provisioning, snapshotting, and resizing via --node-deployment sidecars. This enables multi-node test scenarios (pod failover, node drain, etc.) where PVCs can be created on different nodes instead of all landing on the same one. The resizer sidecar uses a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, pending upstream merge. The distributed deployment manifests are sourced from mnencia/csi-driver-host-path#dev/651-with-resizer, pending kubernetes-csi/csi-driver-host-path#653. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Replace the single-node StatefulSet csi-hostpath deployment with the distributed DaemonSet variant, which runs the CSI driver on every node with per-node provisioning, snapshotting, and resizing via --node-deployment sidecars. This enables multi-node test scenarios (pod failover, node drain, etc.) where PVCs can be created on different nodes instead of all landing on the same one. The resizer sidecar uses a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, pending upstream merge. The distributed deployment manifests are sourced from mnencia/csi-driver-host-path#dev/651-with-resizer, pending kubernetes-csi/csi-driver-host-path#653. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Add the csi-resizer sidecar with --node-deployment=true using a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, which has not yet been merged upstream. This commit is for local testing only and should not be submitted upstream until the resizer PR is merged. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Replace the single-node StatefulSet csi-hostpath deployment with the distributed DaemonSet variant, which runs the CSI driver on every node with per-node provisioning, snapshotting, and resizing via --node-deployment sidecars. This enables multi-node test scenarios (pod failover, node drain, etc.) where PVCs can be created on different nodes instead of all landing on the same one. The resizer sidecar uses a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, pending upstream merge. The distributed deployment manifests are sourced from mnencia/csi-driver-host-path#dev/651-with-resizer, pending kubernetes-csi/csi-driver-host-path#653. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Add the csi-resizer sidecar with --node-deployment=true using a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, which has not yet been merged upstream. This commit is for local testing only and should not be submitted upstream until the resizer PR is merged. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Replace the single-node StatefulSet csi-hostpath deployment with the distributed DaemonSet variant, which runs the CSI driver on every node with per-node provisioning, snapshotting, and resizing via --node-deployment sidecars. This enables multi-node test scenarios (pod failover, node drain, etc.) where PVCs can be created on different nodes instead of all landing on the same one. The resizer sidecar uses a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, pending upstream merge. The distributed deployment manifests are sourced from mnencia/csi-driver-host-path#dev/651-with-resizer, pending kubernetes-csi/csi-driver-host-path#653. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Replace the single-node StatefulSet csi-hostpath deployment with the distributed DaemonSet variant, which runs the CSI driver on every node with per-node provisioning, snapshotting, and resizing via --node-deployment sidecars. This enables multi-node test scenarios (pod failover, node drain, etc.) where PVCs can be created on different nodes instead of all landing on the same one. The resizer sidecar uses a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, pending upstream merge. The distributed deployment manifests are sourced from mnencia/csi-driver-host-path#dev/651-with-resizer, pending kubernetes-csi/csi-driver-host-path#653. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Add the csi-resizer sidecar with --node-deployment=true using a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, which has not yet been merged upstream. This commit is for local testing only and should not be submitted upstream until the resizer PR is merged. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Replace the single-node StatefulSet csi-hostpath deployment with the distributed DaemonSet variant, which runs the CSI driver on every node with per-node provisioning, snapshotting, and resizing via --node-deployment sidecars. This enables multi-node test scenarios (pod failover, node drain, etc.) where PVCs can be created on different nodes instead of all landing on the same one. The resizer sidecar uses a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, pending upstream merge. The distributed deployment manifests are sourced from mnencia/csi-driver-host-path#dev/651-with-resizer, pending kubernetes-csi/csi-driver-host-path#653. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Replace the single-node StatefulSet csi-hostpath deployment with the distributed DaemonSet variant, which runs the CSI driver on every node with per-node provisioning, snapshotting, and resizing via --node-deployment sidecars. This enables multi-node test scenarios (pod failover, node drain, etc.) where PVCs can be created on different nodes instead of all landing on the same one. The resizer sidecar uses a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, pending upstream merge. The distributed deployment manifests are sourced from mnencia/csi-driver-host-path#dev/651-with-resizer, pending kubernetes-csi/csi-driver-host-path#653. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Replace the single-node StatefulSet csi-hostpath deployment with the distributed DaemonSet variant, which runs the CSI driver on every node with per-node provisioning, snapshotting, and resizing via --node-deployment sidecars. This enables multi-node test scenarios (pod failover, node drain, etc.) where PVCs can be created on different nodes instead of all landing on the same one. The resizer sidecar uses a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, pending upstream merge. The distributed deployment manifests are sourced from mnencia/csi-driver-host-path#dev/651-with-resizer, pending kubernetes-csi/csi-driver-host-path#653. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
Replace the single-node StatefulSet csi-hostpath deployment with the distributed DaemonSet variant, which runs the CSI driver on every node with per-node provisioning, snapshotting, and resizing via --node-deployment sidecars. This enables multi-node test scenarios (pod failover, node drain, etc.) where PVCs can be created on different nodes instead of all landing on the same one. The resizer sidecar uses a custom image (ghcr.io/mnencia/csi-resizer:node-deployment) built from kubernetes-csi/external-resizer#573, pending upstream merge. The distributed deployment manifests are sourced from mnencia/csi-driver-host-path#dev/651-with-resizer, pending kubernetes-csi/csi-driver-host-path#653. Signed-off-by: Marco Nenciarini <marco.nenciarini@enterprisedb.com>
What type of PR is this?
/kind feature
What this PR does / why we need it:
For CSI drivers deployed as DaemonSets managing node-local volumes, there is no central controller pod where a centralized external-resizer can run. The provisioner and snapshotter sidecars already support
--node-deploymentfor this deployment model.This adds the same capability to the external-resizer. When enabled, each instance only processes resize requests for PVs whose nodeAffinity matches the local node. The flag requires
NODE_NAMEenv var and is mutually exclusive with--leader-election.The filtering is applied in the controller (
pvNeedResizeandpvCanBeExpanded), covering both Resizer implementations without changes to the Resizer interface.Which issue(s) this PR fixes:
Fixes #142
Special notes for your reviewer:
This is a fresh implementation building on the prior work by @travisghansen in #195 (closed by triage bot), with two key differences:
CanSupport, so it covers both thecsiResizerandtrivialResizercode paths.nodeAffinityinstead of the PVCvolume.kubernetes.io/selected-nodeannotation, which is cleared by the provisioner after binding and would not be available at resize time.The
pvBelongsToNodehelper checksMatchExpressionswithNodeSelectorOpInoperator, which is what CSI provisioners use when translatingAccessibleTopologysegments into PV node affinity. Other operators (NotIn,Exists, etc.) andMatchFieldsare intentionally not handled, as they are not used by CSI drivers for node-local topology.The modify controller (
VolumeAttributesClass) is not covered by node filtering in this PR. Node-local CSI drivers typically do not useVolumeAttributesClass, so this is not blocking for the primary use case and can be addressed in a follow-up.See also kubernetes-csi/csi-driver-host-path#651 for the downstream consumer of this feature.
Does this PR introduce a user-facing change?: