Skip to content

feat(kubectl): support global context and identity flags#426

Open
jordi-murgo wants to merge 1 commit intortk-ai:masterfrom
jordi-murgo:fix/kubectl-global-args
Open

feat(kubectl): support global context and identity flags#426
jordi-murgo wants to merge 1 commit intortk-ai:masterfrom
jordi-murgo:fix/kubectl-global-args

Conversation

@jordi-murgo
Copy link

Summary

  • add a shared KubectlGlobalArgs parser to kubectl pods, kubectl services, and kubectl logs
  • forward --context, --kubeconfig, -n, -l, and --as to underlying kubectl invocations
  • add CLI parsing/unit coverage for the new kubectl flag handling

Why

Using rtk kubectl currently drops common kubectl global flags, which breaks context-specific workflows (e.g. --context). This keeps filtered commands aligned with normal kubectl ergonomics.

Validation

  • cargo test test_kubectl -- --nocapture
  • cargo build --release
  • manual checks:
    • rtk kubectl pods --context savage-ovh
    • rtk kubectl services --context savage-ovh

Forward kubectl global flags (--context, --kubeconfig, -n, -l, --as) to filtered pods/services/logs commands so context-scoped workflows do not fail under rtk parsing.
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.

1 participant