-
Notifications
You must be signed in to change notification settings - Fork 396
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
oc login should avoid clobbering kubeconfig contexts #283
Comments
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/lifecycle frozen |
I'm hoping that this gets a bit of attention - it is quite annoying to have to deal with. In addition, this completely mangles the Using a normal kubeconfig it would look like this: Instead when using On the whole it is not a serious issue, but when have we devs ever let that stop us from complaining about something? |
What's curious is that My main pain point is indeed the long cluster names and longer context names that bloat (and kill) my shell prompt (in smaller windows). |
I have created a support case with Red Hat about this and got the following reply: If others with active support agreements feel that this is important to them, you can reference this when creating your own support request. If more people create requests, maybe it will get enough attention. |
/remove-lifecycle frozen |
Default behavior of
oc login https://openshift.example.com --username=thelonelyghost --password='hunter2'
is to do the following:openshift-example-com:443
thelonelyghost/openshift-example-com:443
default/openshift-example-com:443/thelonelyghost
.default/openshift-example-com:443/thelonelyghost
This is fine for initial setup, but periodically I'm forced to login again to refresh the bearer token stored in the user section of the kubeconfig. When I do that, I must run the same
oc login
command again. Here's the problem:If I re-run that command, it clobbers any changes I've made to human-facing names of the cluster, the context, or the user that have zero functional effect on the file. If I renamed the
default/openshift-example-com:443/thelonelyghost
context to be more user-friendly, such ascompany-prod
, logging in again adds an additional context ofdefault/openshift-example-com:443/thelonelyghost
back again. It does not update credentials in-place, it adds them if they're not named exactly what is expected.I've written a tool in python named
oc-replacement
to re-authenticate in-place as I desire, but it would be much more desirable for this to be default behavior or even an option with theoc
command line tool.The text was updated successfully, but these errors were encountered: