Skip to content

✨ add --namespace and --all-namespaces flags to cli#729

Open
victorchrollo14 wants to merge 2 commits intokubetail-org:mainfrom
victorchrollo14:add-namespace-flag
Open

✨ add --namespace and --all-namespaces flags to cli#729
victorchrollo14 wants to merge 2 commits intokubetail-org:mainfrom
victorchrollo14:add-namespace-flag

Conversation

@victorchrollo14
Copy link
Copy Markdown
Collaborator

Fixes #675

Summary

  • adds support for --namespace, -n and --all-namespaces flags.
  • using --all-namespaces overrides using --namespace.

Changes

  • add 2 new flags --namespace and --all-namespace.
  • filter logs based on the flag passed.

Submitter checklist

  • Add the correct emoji to the PR title
  • Link the issue number, if any, to Fixes #
  • Add summary and explain changes in the PR description
  • Rebase branch to HEAD
  • Squash changes into one signed, single commit 1

Footnotes

  1. See suggested commit format

@victorchrollo14
Copy link
Copy Markdown
Collaborator Author

Screenshot from 2025-10-13 22-32-24

@amorey .
2. --all-namespaces flag overrides the --namespace flag. ( this is the right behaviour right )

Comment thread modules/cli/cmd/logs.go Outdated
logs.WithOSes(osList),
logs.WithArches(archList),
logs.WithNodes(nodeList),
logs.WithAllowedNamespaces(namespaceList),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will prevent the namespace: specifier from working

@github-project-automation github-project-automation bot moved this to In Progress in Kubetail Oct 14, 2025
@victorchrollo14 victorchrollo14 force-pushed the add-namespace-flag branch 3 times, most recently from 28f136c to d1a5aa2 Compare October 23, 2025 15:12
Signed-off-by: victorchrollo14 <chrollolucilfer1402@gmail.com>
…s we fetch logs from workloads across all the namespaces

Signed-off-by: victorchrollo14 <chrollolucilfer1402@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Add support for --namespace and --all-namespaces to CLI tool's logs sub-command

2 participants