Skip to content

fix(kubectl): compact get pods and services aliases#1720

Open
pagarsky wants to merge 1 commit intortk-ai:developfrom
pagarsky:fix/kubectl-get-alias
Open

fix(kubectl): compact get pods and services aliases#1720
pagarsky wants to merge 1 commit intortk-ai:developfrom
pagarsky:fix/kubectl-get-alias

Conversation

@pagarsky
Copy link
Copy Markdown

@pagarsky pagarsky commented May 5, 2026

Summary

  • Route rtk kubectl get pods / get services aliases through the existing compact pod and service filters.
  • Preserve raw kubectl passthrough for unsupported resources and explicit output/detail/watch flags such as -o name or --watch.
  • Add unit coverage for the new get parser path and kubectl resource alias routing.

Context

RTK's hook already rewrites kubectl get pods to rtk kubectl get pods, but that form currently falls through to raw kubectl output instead of using the compact pod/service filters. This made rtk gain show little or no savings for kubectl-heavy sessions, even though kubectl is listed as a supported infrastructure command.

This PR keeps the existing rewrite shape and makes rtk kubectl get pods / get services use the same compact filters as rtk kubectl pods / services. Explicit output/detail flags like -o name still pass through raw kubectl output.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D unsafe_code
  • cargo test --all
  • Manual testing: ./target/debug/rtk kubectl get pods, ./target/debug/rtk kubectl get svc, ./target/debug/rtk kubectl get pods -o name

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 5, 2026

CLA assistant check
All committers have signed the CLA.

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