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

LP#2064305 - Provide method to update kubeconfigs of known formats #21

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

addyess
Copy link
Member

@addyess addyess commented Jun 18, 2024

LP#2064305

Overview

It's not enough to just create a kubeconfig, there are occasions we need to update an existing one. Easy enough to just implement create with the update method

Details

Provide a method of updating an existing kubeconfig file in the event some data like user, token, ca or server changes

@addyess addyess force-pushed the bug/lp2064305/support-updating-kubeconfig branch 2 times, most recently from 1406efc to 5fb890c Compare June 18, 2024 22:05
@addyess addyess changed the title Provide method to update kubeconfigs of known formats LP#2064305 - Provide method to update kubeconfigs of known formats Jun 18, 2024
Comment on lines 489 to 492
assert content["clusters"][0]["name"] == JUJU_CLUSTER
assert content["contexts"][0]["name"] == JUJU_CLUSTER
assert content["contexts"][0]["context"]["cluster"] == JUJU_CLUSTER
Copy link
Member Author

Choose a reason for hiding this comment

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

We could do this another way without the assert. I'm open to ideas

Copy link
Member

@mateoflorido mateoflorido left a comment

Choose a reason for hiding this comment

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

LGTM. Please make sure we handle the AssertionError in the Charm.

@addyess addyess merged commit 7ad0eae into main Jun 20, 2024
6 checks passed
@addyess addyess deleted the bug/lp2064305/support-updating-kubeconfig branch June 20, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants