-
Task
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
-
10
Currently we need to configure the external hostname of Che as a configmap (hostname-http). We could infer that using the OpenShift API instead. Something like the following snippet should work:
if (isOpenShift()) { OpenShiftClient oClient = new DefaultOpenShiftClient(); Route r = oClient.routes().withName("che").get(); if (r!= null){ r.getSpec().getHost(); } } else { throw new Exception("Adapting to OpenShiftClient not support. Check if adapter is present, and that env provides /oapi root path."); }