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

Allow filtering SecretStorage by label selector #100

Open
bastjan opened this issue Feb 14, 2023 · 0 comments
Open

Allow filtering SecretStorage by label selector #100

bastjan opened this issue Feb 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@bastjan
Copy link
Contributor

bastjan commented Feb 14, 2023

Summary

As "an API user"
I want "to filter resources by labels"
So that "i can manage my resources more efficiently"

Context

Label selectors are currently not supported but should be pretty easy to implement.

if err := s.client.List(ctx, rsl, &client.ListOptions{
// TODO(swi): Should we add labels to the secret so we can filter on them?
// Those would need to be hashed to not introduce collisions with controllers tracking state through labels like argocd does.
// LabelSelector: nil,
// FieldSelector: nil,
Namespace: s.getBackingNamespace(),
Limit: options.Limit,
Continue: options.Continue,
}); err != nil {

Out of Scope

No response

Further links

No response

Acceptance Criteria

  • Label filters kubectl get -l blub=blob works
  • Labels on the secret don't collide with argocd and co (hashed or moved elsewhere)

Implementation Ideas

Hash labels and add them to the secret. On list and watch calls hash the label and pass them to the backing secret list and watch.

@bastjan bastjan added the enhancement New feature or request label Feb 14, 2023
@bastjan bastjan mentioned this issue Feb 14, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant