Skip to content

Conversation

@hajiler
Copy link
Contributor

@hajiler hajiler commented Oct 14, 2025

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind feature

What this PR does / why we need it:
This PR is a pre-requisite for the generic volumes feature. It adds disk types supported by a node to the topology information using NodeGetInfo. The PR will be followed up by using this topology information to select a compatible disk type when provisioning a volume.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:
Node attach limit override and the disk type labels rely on reading the Node k8s object. Instead of repeating this request, I migrated it out to NodeGetInfo and piped down the Node object. This also allowed me to add more comprehensive unit testing.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot
Copy link
Contributor

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

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 14, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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

@hajiler
Copy link
Contributor Author

hajiler commented Oct 14, 2025

/test all

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 14, 2025
@sunnylovestiramisu
Copy link
Contributor

/assign @tonyzhc

@hajiler hajiler force-pushed the gv-node-ge-info-branch branch from a2ec1ec to 6fbd415 Compare October 27, 2025 18:43
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 27, 2025
@hajiler hajiler force-pushed the gv-node-ge-info-branch branch from 6fbd415 to 02c19b1 Compare November 5, 2025 21:09
@k8s-ci-robot k8s-ci-robot added 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 Nov 5, 2025
@hajiler hajiler force-pushed the gv-node-ge-info-branch branch from 02c19b1 to 60a5117 Compare November 5, 2025 21:21
@hajiler hajiler force-pushed the gv-node-ge-info-branch branch from 60a5117 to e1d3d24 Compare November 5, 2025 21:35
@hajiler hajiler marked this pull request as ready for review November 5, 2025 21:35
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 5, 2025
Segments: map[string]string{constants.TopologyKeyZone: ns.MetadataService.GetZone()},
}

node, err := k8sclient.GetNodeWithRetry(ctx, ns.MetadataService.GetName())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: You can rename err to nodeErr and avoid having to set it to nil in the if statement.

fmt.Sprintf(constants.NodeRestrictionLabelPrefix, constants.AttachLimitOverrideLabel): "9999",
},
},
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a test case where node is nil as well, just to add coverage for the node == nil case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. release-note-none Denotes a PR that doesn't merit a release note. 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.

6 participants