Skip to content
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

Make route for the workspaces more user friendly #20598

Closed
benoitf opened this issue Oct 6, 2021 · 6 comments · Fixed by eclipse-che/che-operator#1672
Closed

Make route for the workspaces more user friendly #20598

benoitf opened this issue Oct 6, 2021 · 6 comments · Fixed by eclipse-che/che-operator#1672
Assignees
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/enhancement A feature request - must adhere to the feature request template. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. severity/P1 Has a major impact to usage or development of the system. sprint/next
Milestone

Comments

@benoitf
Copy link
Contributor

benoitf commented Oct 6, 2021

Is your enhancement related to a problem? Please describe

Today I've routing to my workspaces that is using the following pattern:

https://che-eclipse-che.apps.my-cluster.com/workspace<tons-of-digits>/<endpoint-name>/<endpoint-port>

Describe the solution you'd like

I would rather have pattern

https://che-eclipse-che.apps.my-cluster.com/<username>/<workspace-name>/<endpoint-port> (endpoint-name being only required if there is several endpoints for a given port)

Describe alternatives you've considered

it could be anything that is more user friendly rather than tons of random digits

Additional context

No response

@benoitf benoitf added kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system. engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. labels Oct 6, 2021
@che-bot
Copy link
Contributor

che-bot commented Apr 4, 2022

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 4, 2022
@benoitf benoitf added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 6, 2022
@l0rd l0rd added area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator and removed area/devworkspace-che-operator labels Jan 23, 2023
@cgruver
Copy link

cgruver commented Apr 7, 2023

@l0rd I'd like to bump this request as well. I recently did a demo with an Angular app integrated with a Quarkus app on the backend via REST.

I had to hack the Angular app to inject the Route to the Quarkus app. https://github.com/eclipse-che-demo-app/che-demo-app/blob/main/setUiEnv.sh

WORKSPACE_ID=$(oc get devworkspace ${WORKSPACE_NAME} -o jsonpath={.status.devworkspaceId})
API_ROUTE=https://$(oc get route ${WORKSPACE_ID}-${CONTAINER_NAME}-${TARGET_PORT}-${ENDPOINT_NAME} -o jsonpath={.spec.host})
sed -i "s|${ENV_VAR}:.*|${ENV_VAR}: \'${API_ROUTE}\'|g" ${ENV_FILE_PATH}

It would be really nice if the route were predictable from information in the devfile.yaml.

@l0rd
Copy link
Contributor

l0rd commented Apr 10, 2023

@cgruver assuming that it works (I am afraid that it doesn't today in Che) I would expose the quarkus application endpoint internally (exposure: internal) and configure the angular app to connect to the service. The service name is predictable (it's the endpoint name). Isn't that an option? I am asking to understand what we should prioritize.

@cgruver
Copy link

cgruver commented Apr 11, 2023

Unfortunately that would not work in this case. The angular app runs in the browser rather than server side. So a Route is the only way for it to talk to the backend API.

@l0rd l0rd removed the engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. label Apr 11, 2023
@ibuziuk ibuziuk added severity/P1 Has a major impact to usage or development of the system. sprint/next and removed severity/P2 Has a minor but important impact to the usage or development of the system. labels Apr 18, 2023
@ibuziuk ibuziuk changed the title [devWorkspace] make route for the workspaces more user friendly Make route for the workspaces more user friendly Apr 19, 2023
@dkwon17
Copy link
Contributor

dkwon17 commented Apr 26, 2023

(endpoint-name being only required if there is several endpoints for a given port)

Hi @benoitf I'm not sure if I fully understand, what is the main use case of having several endpoints for a given port?

@benoitf
Copy link
Contributor Author

benoitf commented Apr 27, 2023

I think probably I wanted to say 'workspace'. Like if I have multiple exposed ports to the outside

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/enhancement A feature request - must adhere to the feature request template. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. severity/P1 Has a major impact to usage or development of the system. sprint/next
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants