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 "target-file" and "merge" flag to airshipctl cluster get-kubeconfig command #495

Closed
teoyaomiqui opened this issue Mar 22, 2021 · 3 comments
Assignees
Labels
1-Core Relates to airshipctl core components (i.e. go code) enhancement New feature or request priority/medium Default priority for items size m
Milestone

Comments

@teoyaomiqui
Copy link
Contributor

teoyaomiqui commented Mar 22, 2021

Problem description (if applicable)
In addition to writing kubeconfig to stdout, it would be convenient to append kubeconfig or overwrite it.

If you use redirect kubeconfig to a file, airshipctl cluster get-kubeconfig > ~/.airship/kubeconfig, redirect > immediately removes the content of the target file, which makes airshipctl unable to use it.

The flag would allow using the flag and then overwrite the file.

Also, the additional flag can be used to merge the contexts from the new kubeconfig into a new one. This will allow extend kubeconfig instead of overriding its entire content.

Proposed change
Add two flags to airshipctl cluster get-kubeconfig --target-file ~/.airship/kubeconfig --merge

--merge (boolean) will allow merging contexts
--target-file (string) will allow specifying target file

NOTE: Actual flag names should be discussed.

@teoyaomiqui teoyaomiqui added enhancement New feature or request triage Needs evaluation by project members labels Mar 22, 2021
@teoyaomiqui teoyaomiqui changed the title Add "output file" flag to airshipctl cluster get-kubeconfig command Add "target-file" and "merge" flag to airshipctl cluster get-kubeconfig command Mar 22, 2021
@jezogwza jezogwza added 1-Core Relates to airshipctl core components (i.e. go code) priority/medium Default priority for items and removed triage Needs evaluation by project members labels Mar 24, 2021
@jezogwza jezogwza added this to the v2.1 milestone Mar 24, 2021
@teoyaomiqui
Copy link
Contributor Author

@vetbijaya all urs

@vetbijaya
Copy link
Contributor

@teoyaomiqui , thank you.

@airshipbot
Copy link

airshipbot commented Mar 31, 2021

Related Change #784111

Subject: Add flags to airshipctl get-kubeconfig cmd
Link: https://review.opendev.org/c/airship/airshipctl/+/784111
Status: NEW
Owner: Bijaya Sharma ([email protected])

This change will close this issue when merged.

Approvals

Code-Review
! None
Verified
-1 Zuul
Workflow
! None

Last Updated: 2021-05-26 09:18:59 CDT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-Core Relates to airshipctl core components (i.e. go code) enhancement New feature or request priority/medium Default priority for items size m
Projects
None yet
Development

No branches or pull requests

5 participants