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
Fix comments at fit_test.go to increase redability #116066
Fix comments at fit_test.go to increase redability #116066
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. |
Hi @yoongon. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
wantStatus: framework.NewStatus(framework.Unschedulable, "Too many pods"), | ||
}, | ||
{ | ||
pod: newResourceInitPod(newResourcePod(framework.Resource{MilliCPU: 5, Memory: 1}), framework.Resource{MilliCPU: 5, Memory: 1}), | ||
nodeInfo: framework.NewNodeInfo(newResourcePod(framework.Resource{MilliCPU: 5, Memory: 19})), | ||
name: "even for equal edge case predicate fails when there's no space for additional pod due to init container", | ||
name: "even for equal edge case for init containers, predicate fails when there's no space for additional pod", |
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.
name: "even for equal edge case for init containers, predicate fails when there's no space for additional pod", | |
name: "even for equal edge case, predicate fails when there's no space for additional pod due to init container", |
This is actually more clear to me.
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.
Thanks for your feedback :)
https://github.com/kubernetes/kubernetes/blob/master/pkg/scheduler/framework/plugins/noderesources/fit_test.go#L561
https://github.com/kubernetes/kubernetes/blob/master/pkg/scheduler/framework/plugins/noderesources/fit.go#L257
It seems to fail because the number of pod({MilliCPU: 5, Memory: 19}) inside node + 1 is greater than AllowedPodNumber(1). 1 +1 > 1
I think init container is not related with this one, so I changed the line.
Correct me if I am wrong.
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.
We construct the pod with newResourceInitPod
here, so we want to highlight the init container, then it matters. Anyway, I think it doesn't make a lot of sense to polish this comments.
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.
Thanks for your nice explanation. I will leave as it is.
/ok-to-test |
39ffe9c
to
4d9b2c8
Compare
@kerthcet I updated the commit based on your review. Please check. |
4d9b2c8
to
8d2c81e
Compare
/lgtm |
LGTM label has been added. Git tree hash: d97c67778ad9bd3122df921af126bbd3a435b42d
|
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, yoongon 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 |
/release-note-none |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
NONE
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: