Open linrl3 opened 1 month ago
@linrl3 thank you for the request! :pray: I think the reason is that the pod usually carries the information about the namespace. Means we probably need an additional RPC on container list to check in which namespace the pod of the container resides. I'm not sure about that, but you're free to propose the change as a PR.
What would you like to be added:
Add a flag option in
crictl ps
command. In https://github.com/kubernetes-sigs/cri-tools/blob/master/cmd/crictl/util.go#L107 there is apodNamespaceRegexp
option. But I didn't understand why we don't have it in flag option. I could create a PR if the it is needed.Why is this needed:
After adding this, we can filter by namespace.