feat: use generic cli args for get-kubeconfig plugin#787
Merged
Conversation
lgarber-akamai
approved these changes
Jul 16, 2025
Contributor
lgarber-akamai
left a comment
There was a problem hiding this comment.
Works well on my end, thank you for the contribution!
ezilber-akamai
approved these changes
Jul 17, 2025
Contributor
ezilber-akamai
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
zliang-akamai
approved these changes
Nov 7, 2025
Member
|
Thank you for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Description
When working with different accounts from the CLI, it is useful to set one specific account on-demand using the
--as-userargument. Theget-kubeconfigplugin did not pass such global CLI arguments through, making it necessary having to make an extra call withset-user, and switching back after.✔️ How to Test
There was no extra unit test written for this, as all other plugins use the same functionality.
Manual testing can be performed by adding two accounts to the Linode CLI config where each account has at least one LKE cluster.
Given that
account1hascluster1andaccount2hascluster2, making a call such aslinode-cli get-kubeconfig --as-user account1 cluster1andlinode-cli get-kubeconfig --as-user account2 cluster2will download and add two contexts to the localkubectlconfiguration.Without this change, the commands return
unrecognized arguments: --as-user account[1 or 2]