Skip to content
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

Added get-kubeconfig plugin #407

Merged
merged 12 commits into from
Mar 28, 2023
Merged

Conversation

ezilber-akamai-zz
Copy link
Contributor

@ezilber-akamai-zz ezilber-akamai-zz commented Mar 20, 2023

📝 Description

Adds a new linode-cli get-kubeconfig ... command that allows users to merge a kubeconfig from an existing cluster to their local machine.

✔️ How to Test

make tetsunit

Resolves #347

@ezilber-akamai-zz ezilber-akamai-zz requested a review from a team March 20, 2023 19:09
Copy link
Collaborator

@jriddle-linode jriddle-linode left a comment

Choose a reason for hiding this comment

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

Don't forget to link/close the issue.

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.

Nice work! Just a few stylistic/testing improvements

linodecli/plugins/get-kubeconfig.py Outdated Show resolved Hide resolved
linodecli/plugins/get-kubeconfig.py Outdated Show resolved Hide resolved
tests/unit/test_plugin_kubeconfig.py Outdated Show resolved Hide resolved
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.

Great work! Tests are passing locally; just one optimization to the merge logic and we should be good to go

linodecli/plugins/get-kubeconfig.py Outdated Show resolved Hide resolved
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.

One last change and we should be good to go!

linodecli/plugins/get-kubeconfig.py Outdated Show resolved Hide resolved
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.

Great work! All tests are passing locally and the following commands work as expected on a merged config:

  • kubectl config get-clusters
  • kubectl config get-users
  • kubectl config get-contexts

@ezilber-akamai-zz ezilber-akamai-zz merged commit f7f48de into linode:dev Mar 28, 2023
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]: allow to merge kubeconfig of lke cluster using cli without having to do that manually
5 participants