Skip to content

Conversation

asmit27rai
Copy link
Contributor

Summary

This PR implements the kflex ctx list command to display all available contexts in the kubeconfig file, with the current context marked with an asterisk (*). The changes include:

  1. Added new ListContexts() function in pkg/kubeconfig/config-util.go
  2. Added new GetCurrentContext() helper function
  3. Updated cmd/kflex/ctx/ctx.go to handle the list command
  4. Added new command definition in cmd/kflex/main.go
  5. Updated documentation in docs/users.md

The implementation follows existing patterns in the codebase and provides a clean, user-friendly way to view all available contexts.

Related issue(s)

Fixes #166

This implements the kflex ctx list command to display all available contexts
in the kubeconfig file, with the current context marked.

Fixes kubestellar#166

Signed-off-by: asmit27rai <raiasmit10@gmail.com>
@asmit27rai
Copy link
Contributor Author

@pdettori Pls review this PR..

Copy link
Contributor

@pdettori pdettori left a comment

Choose a reason for hiding this comment

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

/lgtm

@pdettori pdettori merged commit f75782c into kubestellar:main Apr 21, 2025
6 checks passed
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.

feature: Add kflex command to get the list of available contexts
2 participants