-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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
switch scheduler to generate the merge patch on pod status instead of the full pod #103133
switch scheduler to generate the merge patch on pod status instead of the full pod #103133
Conversation
@marwanad: 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. |
/cc @ahg-g |
bc66728
to
2772506
Compare
2772506
to
06909d9
Compare
06909d9
to
33611b4
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.
/approve
/lgtm
/hold
in case you want to solve the recommendations I left.
33611b4
to
d3e14f6
Compare
d3e14f6
to
8a044cf
Compare
8a044cf
to
48dfa2a
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alculquicondor, marwanad 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 |
/hold cancel |
Please cherry pick to all supported versions (1.19, 1.20, 1.21) https://github.com/kubernetes/community/blob/master/contributors/devel/sig-release/cherry-picks.md |
…3133-upstream-release-1.19 Automated cherry pick of #103133 on 1.19: switch scheduler to generate the merge patch on pod status instead of the full pod
…3133-upstream-release-1.20 Automated cherry pick of #103133 on 1.20: switch scheduler to generate the merge patch on pod status instead of the full pod
…3133-upstream-release-1.21 Automated cherry pick of #103133 on 1.21: switch scheduler to generate the merge patch on pod status instead of the full pod
What type of PR is this?
/kind bug
/sig scheduling
What this PR does / why we need it:
When the scheduler fails to schedule pods (due to insufficient resources for example) and calls into
recordSchedulingFailure
, it attempts to update pod conditions through a strategic merge patch. This patching logic fails if the pod has ImagePullSecrets with noname
since thepatchMergeKey
is set to thename
field. AnimagePullSecrets
input of[{}]
is valid in k8s.As a result certain components that depend on those scheduler conditions to issue a scale-up, fail to do so or even acknowledge the pending pods (for example cluster-autoscaler).
This switches scheduler patching logic to generate the 2-way merge patch on the pod.Status instead of the full pod object.
Which issue(s) this PR fixes:
Fixes #101697
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: