shell-operator icon indicating copy to clipboard operation
shell-operator copied to clipboard

Annotation based selector

Open mhkarimi1383 opened this issue 2 years ago • 0 comments

I want to select Secret and ConfigMap based on their annotations

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

If I select all of the ConfigMaps and handle my job by an if that compares annotations I have to handle lots of resources and that's not efficient.

Describe the solution you'd like to see

Extra field for annotation selector that will do something like this

but instead of returning some values return all of them

kubectl get service -A -o jsonpath='{range .items[?(@.metadata.annotations.prometheus\.io/scrape=="true")]}{ .metadata.namespace },{ .metadata.name}{"\n"}{end}'

Describe alternatives you've considered

Watching for all of them, select them if annotation set by using if

Additional context

mhkarimi1383 avatar Jul 07 '23 21:07 mhkarimi1383