Skip to content

feat: add container match pattern (regex)#82

Open
lad1337 wants to merge 1 commit intojohanhaleby:masterfrom
lad1337:feature/container-pattern
Open

feat: add container match pattern (regex)#82
lad1337 wants to merge 1 commit intojohanhaleby:masterfrom
lad1337:feature/container-pattern

Conversation

@lad1337
Copy link

@lad1337 lad1337 commented Feb 20, 2019

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

@johanhaleby
Copy link
Owner

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)?

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

Successfully merging this pull request may close these issues.

2 participants