Open rodrigovb96 opened 1 year ago
I don't know if it is possible or not;
@mpuckett159 WDYT?
It's definitely not possible with the current jsonpath library but I am seeing about either improving the current implementation of our in tree jsonpath library to support this (hard) or importing an external module to allow for this to be possible (easy). I made some minimal progress a few months ago but had to put it on the back burner and hope to get back to it shortly.
Thank you for the quick response, @mpuckett159 can you share which external module is that?
Oh I didn't even notice this was a recent issue, this comes up quite often haha.
https://github.com/ohler55/ojg
Not exactly sure if this will be acceptable from the maintainers but I have discussed it with them.
/triage accepted /priority backlog
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
/triage accepted
(org members only)/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
JsonPath describes a "or operation" for list filters that is not implemented in kubectl
I would like to add the possibility to do the following:
kubectl get deploy -o jsonpath='{.items[?(@.metadata.name=="foo") || ?(@.metadata.name=="bar")].metadata.name}
With this feature one could do more complex filtering without having to do more than one kubectl request