Skip to content

feat(kgwctl): add CLI with shell completions and kubectl plugin support#714

Open
Mike-4-prog wants to merge 1 commit into
kgateway-dev:mainfrom
Mike-4-prog:feat/kgwctl-completions-clean
Open

feat(kgwctl): add CLI with shell completions and kubectl plugin support#714
Mike-4-prog wants to merge 1 commit into
kgateway-dev:mainfrom
Mike-4-prog:feat/kgwctl-completions-clean

Conversation

@Mike-4-prog

Copy link
Copy Markdown
Contributor
  • Add kgwctl CLI with get, version, and completion commands
  • Implement shell completions for bash, zsh, fish, powershell
  • Add kube client helper for Kubernetes API access
  • Update .gitignore to exclude binaries

Description

Motivation

This PR completes the polish items for kgwctl before general availability as outlined in issue #13658.

What changed

  • Added kgwctl CLI with the following commands:
    • version - displays the CLI version
    • get - retrieves Kubernetes pods (demonstrates K8s API integration)
    • completion - generates shell completion scripts for bash, zsh, fish, and powershell
  • Added pkg/kube/client.go - reusable Kubernetes client helper
  • Updated .gitignore to exclude kgwctl binaries

Related issues

Updates #13658

Change Type

/kind feature

Changelog

Add kgwctl CLI with shell completions and kubectl plugin support

# Additional Notes

**Remaining items from #13658:**
- Documentation for all commands
- Install script update
- Homebrew formula (consideration)

**Next steps after this PR:**
1. Create a follow-up PR for documentation
2. Create another PR for install script updates
3. Then finally close #13658

- Add kgwctl CLI with get, version, and completion commands
- Implement shell completions for bash, zsh, fish, powershell
- Add kube client helper for Kubernetes API access
- Update dependencies to k8s.io/client-go v0.35.3
- Update .gitignore to exclude binaries

Closes #13658

Signed-off-by: MIKE-4-prog <uzukwuekene.michael@gmail.com>
@Mike-4-prog

Copy link
Copy Markdown
Contributor Author

Hi maintainers 👋

Just a gentle bump on this PR:
kgateway-dev/kgateway#714

This PR adds:

  • kgwctl CLI (version, get, completion)
  • Shell completions (bash, zsh, fish, powershell)
  • kubectl plugin support
  • Kubernetes client helper

All CI checks are passing and the PR is ready for review.

Happy to adjust or split this into smaller PRs if that would make review easier 🙏

@kristin-kronstain-brown kristin-kronstain-brown left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it would make more sense to move these changes over to: https://github.com/kgateway-dev/kgateway

This is the docs repo.

@Mike-4-prog

Copy link
Copy Markdown
Contributor Author

I think it would make more sense to move these changes over to: https://github.com/kgateway-dev/kgateway

This is the docs repo.

Thanks for the clarification @kristin-kronstain-brown 🙏
I mistakenly thought this repository also handled the kgwctl implementation work alongside the docs.

I’ll hold off on further updates here for now while maintainers discuss the direction for kgwctl, and can move/rework the changes in the main kgateway repo if that’s the preferred path going forward. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants