Skip to content

Conversation

merll
Copy link
Contributor

@merll merll commented Jun 20, 2025

📝 Description

When working with different accounts from the CLI, it is useful to set one specific account on-demand using the --as-user argument. The get-kubeconfig plugin did not pass such global CLI arguments through, making it necessary having to make an extra call with set-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 account1 has cluster1 and account2 has cluster2, making a call such as linode-cli get-kubeconfig --as-user account1 cluster1 and linode-cli get-kubeconfig --as-user account2 cluster2 will download and add two contexts to the local kubectl configuration.

Without this change, the commands return unrecognized arguments: --as-user account[1 or 2]

@merll merll requested a review from a team as a code owner June 20, 2025 10:30
@merll merll requested review from lgarber-akamai and ezilber-akamai and removed request for a team June 20, 2025 10:30
Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

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

Works well on my end, thank you for the contribution!

Copy link
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

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.

3 participants