Skip to content

Allow filtering SecretStorage by label selector #100

@bastjan

Description

@bastjan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions