eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

Add ability to override base domain of workspaces endpoints to match custom Che server hostname base domain #23249

Open achdmbp opened 1 day ago

achdmbp commented 1 day ago

Is your enhancement related to a problem? Please describe

When configuring custom hostname for Che as described Configuring Eclipse Che server hostname. Let's say we use che.devs.mycompany.com as the hostname, the behavior will be:

Describe the solution you'd like

to support switching to a new cluster and keep same custom domain of che server, add ability to use same base domain of custom hostname to be used also to generate workspace endpoints

Describe alternatives you've considered

No response

Additional context

No response

tolusha commented 1 day ago

@achdmbp Try this by updating CheCluster CR:

spec:
  components:
    cheServer:
      extraProperties:
        CHE_INFRA_OPENSHIFT_ROUTE_HOST_DOMAIN__SUFFIX: "<...>"
achdmbp commented 3 hours ago

@tolusha thank you very much. this worked! I'm surprised this wasn't documented in the admin guide or maybe I missed it somewhere ?

also is there a way to change the strategy to serve the endpoints via the main che gateway. for example,

https://<che _url>/<user>-<workspace>-<endpoint-name>

instead of creating the endpoint as new routes. Using https://<che _url>/<user>-<workspace>-<endpoint-name> is much easier to point explicit DNS entry to openshift ingress router NLB. vs having to use wild card domain record to cover all endpoints