kubetail
kubetail copied to clipboard
feat: add container match pattern (regex)
As we are using some auto injected containers into our pods (linkerd) and i still want to be able to follow multiple pods that have different containers i added a container name filter option.
example
kubetail '.*mypod-http.+|.*mypod-background.+' -C '.*mypod.*' -e regex
-C
is short for --container-pattern
which defaults to .*
note: i'm not sure how to format the help text with the long name container-pattern
Hi! Thanks for the PR!
What happens when you specify both a normal container name (1) and a container pattern (2)? From what I understand it first tries to match on (1) and only those that matches (1) are eligible for (2)? Is this correct? Should this really be the case? Perhaps it's easier to understand, and it's more consistent with how pod matching works, if it's strictly either (1) or (2)?