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

Annotation based selector #512

Open
mhkarimi1383 opened this issue Jul 7, 2023 · 0 comments
Open

Annotation based selector #512

mhkarimi1383 opened this issue Jul 7, 2023 · 0 comments

Comments

@mhkarimi1383
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant