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

Add --merge option to k3sup install #1

Closed
alexellis opened this issue Aug 15, 2019 · 4 comments
Closed

Add --merge option to k3sup install #1

alexellis opened this issue Aug 15, 2019 · 4 comments
Labels

Comments

@alexellis
Copy link
Owner

alexellis commented Aug 15, 2019

Description

Add --merge option to k3sup install

Detail

This would take an existing kubeconfig file and merge the incoming configuration. By default this tends to switch the context.

Examples:

https://ahmet.im/blog/mastering-kubeconfig/

This can also be done via code with kubectl:

https://github.com/civo/cli/blob/0a5cd47484999fb61f5bd27c46c81209211b2bb4/lib/kubernetes.rb#L200

If we can avoid vendoring the Kubernetes clientset, then this will keep the binary quick to build and relatively lean. Perhaps using go/exec to run kubectl?

@alexellis alexellis added enhancement New feature or request good first issue Good for newcomers labels Aug 15, 2019
@alexellis
Copy link
Owner Author

If anyone should want to pick this up, I think the way the Civo Ruby CLI does this would work fine for the tool.

It should be a relatively simple case of "exec" to run "kubectl" and then flatten/merge the new kubeconfig and the old one (if it exists).

Example of go/exec -> https://golang.org/src/os/exec/example_test.go

@utsavanand2
Copy link
Contributor

I've sent a pull request :)

@alexellis
Copy link
Owner Author

alexellis commented Aug 17, 2019

@utsavanand2's PR is: #4

@alexellis
Copy link
Owner Author

/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants