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

cm attach should handle kubeconfig blobs #173

Closed
cdoan1 opened this issue Feb 1, 2022 · 4 comments
Closed

cm attach should handle kubeconfig blobs #173

cdoan1 opened this issue Feb 1, 2022 · 4 comments

Comments

@cdoan1
Copy link

cdoan1 commented Feb 1, 2022

Hi Team, cm is perfect for automating attach clusters. However, we currently support getting kubeconfig from a file. Would it be possible to accept kubeconfig as a string, and then, also optionally, base64 string to keep these a little more secure?

oc get secret $(oc get hc acmsre-hyper-36 -n clusters --no-headers | awk '{print $3}') -n clusters -ojsonpath='{.data.kubeconfig}' | base64 --decode > kubeconfig.temp

cm attach cluster acmsre-hyper-36 --cluster-kubeconfig=./kubeconfig.temp
@itdove
Copy link
Contributor

itdove commented Feb 4, 2022

why not create a cmd cm attach hostedcluster <cluster_name> ? as we already have cm attach clusterclaim <clusterclaim_name>

@itdove
Copy link
Contributor

itdove commented Feb 5, 2022

@cdoan1 Now a parameter --cluster-kubeconfig-content is added to the cm attach cluster cmd.
This will be part of the next version but meanwhile you can clone the repo and run make build to install the latest cm.

I created a new issue for the cm attach hostedcluster #182

@itdove itdove closed this as completed Feb 5, 2022
@cdoan1
Copy link
Author

cdoan1 commented Feb 7, 2022

sorry i missed the comment about cm attach hostedcluster . That would work too, what ever is easier

@itdove itdove reopened this Feb 7, 2022
@itdove
Copy link
Contributor

itdove commented Feb 7, 2022

I had an issue while merging to main, fixing now.

@itdove itdove closed this as completed Feb 7, 2022
itdove added a commit to itdove/cm-cli that referenced this issue Feb 23, 2022
Signed-off-by: Dominique Vernier <dvernier@redhat.com>
@itdove itdove mentioned this issue Feb 23, 2022
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

No branches or pull requests

2 participants