-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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 scheduler version skew handling for in-place pod resize #118843
Conversation
ac1080f
to
3687c64
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wlp1153468871 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 |
@@ -720,7 +720,7 @@ func TestPodResourceRequests(t *testing.T) { | |||
{ | |||
description: "resized, infeasible", | |||
expectedRequests: v1.ResourceList{ | |||
v1.ResourceCPU: resource.MustParse("2"), |
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.
Why are we changing these resource size in tests?🤔️
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.
According to the chapter Version Skew Strategy
of the KEP-1287, when kube-scheduler computes the pod resource requests, it should use max(AllocatedResources, Requests) if PodStatus.Resize != "".
In this test case, the PodStatus.Resize is equal to Infeasible and the AllocatedResources is less than Requests, so the expected result is Requests. I'm not sure that this change is reasonable when the PodStatus.Resize is equal to Infeasible. If I misunderstood, please correct me. Thanks.
FYI:
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.
Ah I see, sgtm
@vinaykul Can you help me review a PR? Thank you |
/remove-sig api-machinery |
untagged mistakenly /sig api-machinery |
@mikedanese @sttts Can you help me review a PR? Thank you |
@wlp1153468871 Thank you very much for picking this up! Could we please fix both kubelet and scheduler fix in a single PR so that it fully resolves the issue? We should add an e2e test for this.. maybe we can extend test/e2e/node/pod_resize.go @bobbypage @BenTheElder Does that above suggestion look reasonable? (Will setting the --feature-gates flag override for kubelet & scheduler? If not, would the inverse work?) I'm also wondering if an e2e skew testing CI job already exists. It sounds a boilerplate version skew test job for our version skew support matrix is something many alpha and beta features could use, and in general to detect skew regressions. I do see references to |
Thank you very much for your reply. However, I have noticed that pbialon has already claimed the task related to kubelet. I would be grateful to hear your thoughts on this matter, @bobbypage @BenTheElder |
@wlp1153468871: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
That's ok, we can have two PRs. The core code change is quite simple in this but the idea is for new contributors to get a broader view of the upgrade scenario considerations and how it can be exercised in CI so it two contributors get to learn, twice as better. |
PR needs rebase. 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. |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
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. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
If PodStatus.Resize field is not empty, scheduler uses max(ResourcesAllocated, Requests) even if the feature-gate is disabled.
Which issue(s) this PR fixes:
Fixes #117767
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: