[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to identify OpenShift v4?





On Thu, Oct 3, 2019 at 11:47 AM Andre Dietisheim <adietish redhat com> wrote:
Hi

Since the endpoint "/version/openshift" is gone, how can a client
library identify the OpenShift version it deals with?

I believe "/version" still exists, just not "/version/openshift".

Here is how the openshift jenkins login plugin does it:

https://github.com/openshift/jenkins-openshift-login-plugin/blob/master/src/main/java/org/openshift/jenkins/plugins/openshiftlogin/OpenShiftOAuth2SecurityRealm.java#L640-L678

Here is how `oc` does it:

https://github.com/openshift/oc/blob/master/pkg/cli/version/version.go#L109-L172
and
https://github.com/openshift/oc/blob/master/vendor/k8s.io/client-go/discovery/discovery_client.go#L407-L418

where you can see it going after /version

Thanks for your pointers!

Cheers
André


_______________________________________________
dev mailing list
dev lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]