webhook: detect matchExpression selector overlaps#246
Conversation
Signed-off-by: Sahitya Chandra <sahityajb@gmail.com>
✅ Deploy Preview for node-readiness-controller canceled.
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sahitya-chandra The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @sahitya-chandra. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
|
/cc @ajaysundark |
Description
Port the selector-overlap helper downstream (for now) into the webhook package and use it from
nodeSelectorsOverlap.PR #212 fixed the common
matchLabelssubset case, but its implementation intentionally left a limitation for selectors usingmatchExpressions. This change replaces that heuristic with a local satisfiability check over selector requirements grouped by key, covering:In,NotIn,Equals,DoubleEquals, andNotEqualsExistsandDoesNotExistGreaterThanandLessThanmatchLabelsthat still overlap on a possible node label setRelated Issue / PR
Follow-up to #212
Type of Change
/kind bug
Testing
make setup-envtestenv GOCACHE=/tmp/node-readiness-controller-go-cache make testChecklist
go fmtmatchExpressionsoverlap and non-overlap casesmake testpassesDoes this PR introduce a user-facing change?