-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Rule ordering #6187
Rule ordering #6187
Conversation
/assign x13n |
8bcb5ba
to
6bc42b9
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: artemvmin 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 |
6bc42b9
to
bdcbbf6
Compare
bdcbbf6
to
2d265fe
Compare
I'm not a fan of this approach. It implies rule ordering doesn't matter - only outcome priority does, which is not true (see #6077 for an example why). Another issue is that it will be impossible to create custom rules blocking drain if there's an existing rule resulting in |
Agreed. Consider this alternate implementation, which makes the framework more flexible, not less: #6196 |
Thanks. Reviewed the other PR and closing this one. /close |
@x13n: 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 cleanup
What this PR does / why we need it:
Adds priority to drainability rules. This allows custom rules that return a lower priority outcome (e.g. DrainOk) to not get blocked by higher priority outcomes (e.g. SkipDrain).
Special notes for your reviewer:
Parent rebase: #6164
The one complication is that the legacy replica count check is now run after DrainOk rules (i.e. daemonset, safetoevict, and terminal). See drainability/rules.go and the now-combined replicated rule. If this is not okay, I have some alternatives:
Does this PR introduce a user-facing change?