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). |
Default behavior of
oc login https://openshift.example.com --username=thelonelyghost --password='hunter2'is to do the following:openshift-example-com:443thelonelyghost/openshift-example-com:443default/openshift-example-com:443/thelonelyghost.default/openshift-example-com:443/thelonelyghostThis 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 logincommand 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/thelonelyghostcontext to be more user-friendly, such ascompany-prod, logging in again adds an additional context ofdefault/openshift-example-com:443/thelonelyghostback 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-replacementto 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 theoccommand line tool.The text was updated successfully, but these errors were encountered: