Description
Is your feature request related to a problem? Please describe.
The fields available in a DevWorkspace's status are currently
status:
conditions: <conditions list>
ideUrl: <string>
message: <string>
phase: <string>
workspaceId: <string>
However, a devfile will generally contain multiple endpoints, which is unsupported by the singular ideUrl
field. This poses a problem for consumers of devfiles such as Theia, as there's no straightforward way to match an endpoint
in the devfile with a URL from a route/ingress created on the cluster. Additionally, the ideUrl field is specific to a few use cases, and should be removed/renamed to reflect a more generic usage. We should:
- Deprecate/remove/rename
.status.ideUrl
(perhaps to.status.mainUrl
?) - Define a way to mark a specific endpoint in the devfile as our "main" entrypoint
- Currently, the DWO looks for an endpoint with the attribute
type: ide
, which is clearly not useful for everyone.
- Currently, the DWO looks for an endpoint with the attribute
- Represent all URLs created for a devfile in the status, preferably linked to endpoints/components, so that we can take an endpoint in the devfile and resolve the URL that points to it.
Describe the solution you'd like
Two options come to mind for me:
Option 1: Represent just URLs in status
This is a straightforward addition of endpoint URLs to the status. This option is cleaner and simpler to read.
status:
# other fields...
mainUrl: <url-of-endpoint-with-specific-attribute?>
endpoints:
- name: <endpoint-name>
component: <component-name>
url: <url>
Option 2: Represent component statuses in status, with subfield for endpoints
As opposed to option 1, this approach would be more easily extensible if we want to represent additional information about components in the devfile in the future (e.g. if we decide to also propagate container statuses for each container component?)
status:
# other fields...
mainUrl: <url-of-endpoint-with-specific-attribute?>
componentStatuses:
- name: <component-name>
endpoints:
- name: <endpoint-name>
url: <url>