Skip to content

feat: use generic cli args for get-kubeconfig plugin #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

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]

📷 Preview

If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.

@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
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.

1 participant