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

Add native to framework LabelSelector support #1538

Closed
Danil-Grigorev opened this issue Jul 16, 2024 · 0 comments · Fixed by #1539
Closed

Add native to framework LabelSelector support #1538

Danil-Grigorev opened this issue Jul 16, 2024 · 0 comments · Fixed by #1539

Comments

@Danil-Grigorev
Copy link
Member

Danil-Grigorev commented Jul 16, 2024

Would you like to work on this feature?

yes

What problem are you trying to solve?

While trying to implement a requirement to reconcile objects based on label existence on either the object of the objects Namespace, we faced with missing functionality. Passing label selector to the controller to establish watches on the resource is not possible in this scenario without duplicating cache content, or entirely ignoring label selectors in watch and storing all watched resources in memory.

In such case we need to perform label selector matching logic on the client side.

Describe the solution you'd like

#1482 or similar.

User can preserve the original LabelSelector for serialization/deserialization purposes.
A separate structure capable of converting From LabelSelector will allow to perform match operation on the resource or directly resource labels.

Describe alternatives you've considered

Linkerd: https://github.com/linkerd/linkerd2/blob/main/policy-controller/k8s/api/src/labels.rs
Crust-gather: https://github.com/crust-gather/crust-gather/blob/main/src/gather/selector.rs

Documentation, Adoption, Migration Strategy

No response

Target crate for feature

core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant