-
Notifications
You must be signed in to change notification settings - Fork 41.5k
feature(volumebinding): Implement PreScore for VolumeBinding plugin to skip score #115768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions 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/test-infra repository. |
489d71e
to
5cfe7f7
Compare
5cfe7f7
to
5d52d0f
Compare
/cc @sanposhiho |
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
sorry I need to prioritize my KEPs related implementation these days. will get back here after them 🙏 |
/assign |
This pr is |
/remove-lifecycle rotten |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nits only
pkg/scheduler/framework/plugins/volumebinding/volume_binding_test.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/framework/plugins/volumebinding/volume_binding_test.go
Outdated
Show resolved
Hide resolved
/retest |
e117c37
to
28026ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
LGTM label has been added. Git tree hash: e3eac09a9d43c4ffbdeec73c2c9e2d9bf31a60ca
|
@kubernetes/sig-scheduling-approvers Anyone ptal for the second path. (The bot assigned it to me for |
@AxeZhan This change deserves to be in the release note since we newly introduce PreScore for VolumeBinding. |
if err != nil { | ||
return framework.AsStatus(err) | ||
} | ||
for _, podVolumes := range state.podVolumesByNode { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to be iterating over all nodes in a non-parallel loop, which might be more expensive than just running Score. So I'm not sure if we are gaining anything.
I would prefer a simpler check, like podVolumesByNode
being empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we add a bool flag in state data?
type stateData struct {
allBound bool
podVolumesByNode map[string]*PodVolumes
podVolumeClaims *PodVolumeClaims
sync.Mutex
// hasStaticBindings declares whether the pod contains one or more StaticBinding.
// If not, vloumeBinding will skip score extension point.
hasStaticBindings bool
}
Then we can easily check here:
if state.hasStaticBindings {
return nil
}
return framework.NewStatus(framework.Skip)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, you can get the boolean in Filter.
28026ed
to
2e1deb7
Compare
2e1deb7
to
210ed2e
Compare
/approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
LGTM label has been added. Git tree hash: 9f3dd5353c114d0e1883a71b1e199b02a2ce1d04
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, AxeZhan, sanposhiho The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Implement prescore for
volumebinding
plugin to let it skip score extension in some scenario.Which issue(s) this PR fixes:
Part of #115745
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: