Skip to content
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

Constraint solver to determine overlapping label selectors #19830

Closed
madhusudancs opened this issue Jan 19, 2016 · 7 comments
Closed

Constraint solver to determine overlapping label selectors #19830

madhusudancs opened this issue Jan 19, 2016 · 7 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.

Comments

@madhusudancs
Copy link
Contributor

Today, when we want to determine resources with overlapping selectors, for example overlapping replication controllers, we check if the selector of one resource matches the selector of the other and vice-versa. This is easy to do with the current map{string->string} selectors.

But determining overlaps in the case of new label selectors need a more sophisticated constraint solver. Implement one.

cc @bgrant0607

@bgrant0607 bgrant0607 added help-wanted priority/backlog Higher priority than priority/awaiting-more-evidence. and removed team/api labels Jan 20, 2016
@bgrant0607
Copy link
Member

Specifically, the check we have now is able to confirm some cases of definite overlap, which is used to warn the user in kubectl stop rc.

Definite overlap occurs when one controller's selector contains a subset of keys of the other controller's selector, and the intersection of the sets of matching values for each of those keys (where Exists implies all values) is non-empty.

Though we don't currently have such a check AFAIK, we could also implement a check for definite non-overlap, which could be determine in the case that for at least one key the intersection of values is empty (e.g., In {v1} intersect NotIn {v1}).

@bgrant0607 bgrant0607 added this to the v1.2-candidate milestone Jan 20, 2016
@bgrant0607
Copy link
Member

See also #2210

cc @erictune

@bgrant0607
Copy link
Member

cc @janetkuo

@soltysh
Copy link
Contributor

soltysh commented Dec 22, 2016

Ref #36859 (comment)

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label May 31, 2017
@0xmichalis
Copy link
Contributor

@kubernetes/sig-api-machinery-misc

@k8s-ci-robot k8s-ci-robot added the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Jun 11, 2017
@k8s-github-robot k8s-github-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jun 11, 2017
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 27, 2017
@bgrant0607
Copy link
Member

Can revisit later if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery.
Projects
None yet
Development

No branches or pull requests

7 participants