solo-io / gloo

The Feature-rich, Kubernetes-native, Next-Generation API Gateway Built on Envoy
https://docs.solo.io/
Apache License 2.0
4.07k stars 434 forks source link

Labeled selectors for watched resources #6871

Open jackstine opened 2 years ago

jackstine commented 2 years ago

Version

No response

Is your feature request related to a problem? Please describe.

Currently, we can only watch resources in a given namespace or all the namespaces, regardless of the resources.

We would like to filter the resources by the label metadata available on those resources to reduce the number of watched resources that Gloo is watching.

Describe the solution you'd like

Would like to add the ability to add a labels field to allow for resources to be filtered to only watch those labels. We can use set based labels to filter the resources.

Describe alternatives you've considered

Other things to consider would be adding a GlobalLabels setting would apply to all watchedNamespaces, while each namespace would have its own Labels as well. This would provide a merging of the global and namespace watched labels.

Each Namespace would have the ability to ignoreGlobaLabels which would ignore any global label filters.

Additional Context

No response

jackstine commented 2 years ago

We could just use set-based labels only. And neglect equity based labels. Set based labels provided the same functionality as equity based, and there would be no need to support both.

https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#set-based-requirement

github-actions[bot] commented 3 months ago

This issue has been marked as stale because of no activity in the last 180 days. It will be closed in the next 180 days unless it is tagged "no stalebot" or other activity occurs.