-
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
PodTolerationRestriction: ignore duplicates when changing pod toleration #111712
base: master
Are you sure you want to change the base?
Conversation
6784343
to
161499d
Compare
|
/cc @KevinWang15 @tallclair |
@pacoxu: GitHub didn't allow me to request PR reviews from the following users: KevinWang15. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. 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. |
161499d
to
327b8c3
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pacoxu 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 |
Given that my fix in #97850 will need to move |
We tried in different ways. You fix it on the validation side, and I wanted to fix it in the admission plugin. |
/triage accepted |
/priority important-longterm |
Some users met this in their product cluster after enabling |
I am not sure who is the feature owner of PodTolerationRestriction. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
/easycla |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
@@ -108,7 +108,16 @@ func (p *Plugin) Admit(ctx context.Context, a admission.Attributes, o admission. | |||
} | |||
// Final merge of tolerations irrespective of pod type. | |||
if len(extraTolerations) > 0 { | |||
pod.Spec.Tolerations = tolerations.MergeTolerations(pod.Spec.Tolerations, extraTolerations) | |||
mergedOldTolerations := tolerations.MergeTolerations(pod.Spec.Tolerations, nil) |
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 haven't studied the logic carefully, please correct me if I'm wrong. Intuitively, this call looks a bit strange. Can we modify the logic instead of calling the same method repeatedly with different parameters? This may make it difficult to understand the code.
What type of PR is this?
/kind bug
What this PR does / why we need it:
Reproduce steps
{"operator":"Exists","effect":"NoSchedule"},
, and pod A-1 was createdWorkarounds
Which issue(s) this PR fixes:
Fixes #111745
Special notes for your reviewer:
See more in the issue reproduce steps and logics.
Does this PR introduce a user-facing change?