-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 cluster console #11355
oc cluster console #11355
Conversation
This doesn't really have anything to do with cluster up/down... it's just looking at the client config, which could come from anywhere. |
This was in minishift to give an equivalent feature to minikube. If this was to be added anywhere it could go in as |
there's no guarantee that the server your kubeconfig is pointing to has a web console configured. |
That's a very good point & why it makes more sense in mini* because we don't use the kube config context to work out the console/dashboard address. |
I'm thinking about this as a local developer convenience, which is why I put it under But I'm just a beginner, not fully understanding all the consequences, so if it really doesn't make any sense, then please feel free to close the PR. |
@csrwng PTAL |
@Ladicek @fabianofranz do we want the command to open the console to whatever cluster your cli is pointing to? or do we want it to open the console to a cluster you started with cluster up? If the former, maybe it should be under 'oc config' or just 'oc', instead of under cluster ? (may be confusing). If the latter, then it should likely use the URL obtained with the status command, see #11171 |
We recently argued against the same type of feature in kubectl in kubernetes (with opening kube dashboard). I don't want to start making assumptions from the CLI that a web console is always installed when it is not in some clusters. |
While I still very much like the convenience, I can see now why it's not necessarily the best idea. Thanks all. |
This PR adds a new command
oc cluster console
that opens the OpenShift web console of the local cluster in a web browser, or just provides the URL. It's merely for convenience. The idea was stolen from @jimmidyson's Minishift.This is my first attempt at a contribution to OpenShift, so please forgive me (and warn me) if I'm doing something wrong. It's also the first piece of code I wrote in Go, so if I'm doing something wrong on that side, I'd be happy to fix it.
All that said:
godep
actually took me a lot more time than writing the code itself.Disclosure: I do work for Red Hat, but I'm not on the OpenShift team.