Skip to content

WIP: Add support for MutableCSINodeAllocatableCount#1066

Draft
nschad wants to merge 2 commits intomainfrom
dynamic-volume-limits
Draft

WIP: Add support for MutableCSINodeAllocatableCount#1066
nschad wants to merge 2 commits intomainfrom
dynamic-volume-limits

Conversation

@nschad
Copy link
Copy Markdown
Contributor

@nschad nschad commented May 7, 2026

How to categorize this PR?

/kind enhancement

What this PR does / why we need it:

This PR updates the CSI driver to dynamically calculate the maximum allocatable volume count when the MutableCSINodeAllocatableCount feature gate is enabled.

Instead of relying on a static limit, the driver now scans the system for existing PCIe devices and subtracts them from the instance type's theoretical maximum PCIe lane capacity. This ensures that hardware overhead—such as additional Network Interface Cards (NICs)—is accounted for, preventing volume attachment failures due to exhausted root ports.

This will also lead to better scheduling decision by the kube-scheduler.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Breaking changes:

@ske-prow
Copy link
Copy Markdown

ske-prow Bot commented May 7, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ske-prow ske-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 7, 2026
@ske-prow
Copy link
Copy Markdown

ske-prow Bot commented May 7, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign dergeberl for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ske-prow ske-prow Bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 7, 2026
nschad added 2 commits May 8, 2026 12:50
The CSI list's all PCIe devices that are not of
type VIRTIO_BLOCK_DEVICE and subtracts them from
the theoretically maximum, so kubernetes can report
a correct dynamic max volume count that can be attached
for each node.

Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
Signed-off-by: Niclas Schad <niclas.schad@stackit.cloud>
@nschad nschad force-pushed the dynamic-volume-limits branch from c9ac70a to 127f8d7 Compare May 8, 2026 10:52
@nschad nschad changed the title WIP: Query PCIe ports for correct amount of devices that can be attac… Add support for MutableCSINodeAllocatableCount May 8, 2026
@nschad nschad changed the title Add support for MutableCSINodeAllocatableCount WIP: Add support for MutableCSINodeAllocatableCount May 8, 2026
@nschad
Copy link
Copy Markdown
Contributor Author

nschad commented May 8, 2026

/kind enhancement

/hold waiting for IaaS to clarify some API endpoints

@ske-prow ske-prow Bot added kind/enhancement Enhancement, improvement, extension do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels May 8, 2026
@nschad nschad requested a review from a team May 8, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/enhancement Enhancement, improvement, extension size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant