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.
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.
control-api/apiserver/secretstorage/storage.go
Lines 161 to 169 in 72c593a
Out of Scope
No response
Further links
No response
Acceptance Criteria
kubectl get -l blub=blobworksImplementation Ideas
Hash labels and add them to the secret. On
listandwatchcalls hash the label and pass them to the backing secretlistandwatch.