che: [Hosted Che] OpenShift Connector plugin does not work properly

Is your task related to a problem? Please describe.

As part of https://github.com/redhat-developer/rh-che/issues/1832 we would like to enable the OpenShift Connector for every single workspace on Hosted Che. However, there are a couple of things that need to be fixed first:

image

Describe the solution you’d like

OpenShift Connector plugin works properly on Hosted Che - console link is displayed correctly + user is logged to the user namespace by default.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

@azatsarynnyy Nice!, Thank you

@ibuziuk thanks, your request works!

This behavior is the expected behavior for tools like kubectl and derivatives. These tools detect the context when inside a cluster using environment variables such as KUBERNETES_SERVICE_PORT, KUBERNETES_PORT, KUBERNETES_SERVICE_HOST. You can see all of those if you do a env | grep KUBE on the workspace.

The namespace and token comes from /var/run/secrets/kubernetes.io/serviceaccount/*.

I think the problem with the console URL is going to correct itself on a 4.x cluster because openshift extension has corrected the changed behavior which should cover incluster case for 4.x too.