-
Notifications
You must be signed in to change notification settings - Fork 64
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
Extending DevWorkspace Status fields #370
Comments
from consumer perspective within che-theia I prefer option 2 because it's a direct mapping of components ( component statuses) ( less loops in client's code) And in component status it would be nice to know if component was defined in 'original' devfile or being added by 3rd party ( boolean attribute telling if it's a user defined or 3rd party component by filtering components by some labels) About main Url I'm even ok if it's removed ( because for example Che dashboard or Che theia know which terminal type to look) but I agree it's helpful when using 'kubectl get dw' command for example |
I'm generally opposed to duplicating that information from the spec -- at a certain point we risk printing large pieces of the devfile twice. The information we add to the status should be
Yeah, the |
From che-theia perspective we'll have to merge all information so if status contains everything it's nice to me ( or if that kind of merged result is provided in a mounted file). If it's not then Che theia and maybe others client will have to merge data / iterate over two struct And for private endpoint there is no URL but then it's listed in devfile spec but it means it won't show up in the status ( which is strange when you consume it from a client point of view) so if status could avoid iterating/looping again and again in clients it would be helpful
|
What would be the behavior of |
@metlos --> an error if more than one is defined ? |
It's a hard problem to answer -- e.g. an odo devfile could have a mainEndpoint (or ideUrl in the current implementation) that's required when the application is deployed, but when we add an IDE to that devfile we need to define a new mainEndpoint. It's hard to say how to resolve this, but it is a problem in the current design as well. |
I understand the goal of having the status hold bookkeeping info and how that makes it easier to use on the consumer-side, but I also think it clutters the status greatly, which is why I'm against it. It's not terribly costly to e.g. define functions Another option since (at least for our main use case currently) the main piece of data we're tying back to the devfile is the URL: we could also set the URL directly in the DevWorkspace. This is e.g. what k8s services do ( Using attributes- name: theia-ide
container:
image: "quay.io/eclipse/che-theia:next"
endpoints:
- name: "theia"
attributes:
type: ide
controller.devfile.io/url: <resolved URL for endpoint> Using a new field on endpoint- name: theia-ide
container:
image: "quay.io/eclipse/che-theia:next"
endpoints:
- name: "theia"
url: <resolved URL for endpoint>
attributes:
type: ide |
Really?! no exposure endpoint should have
I like the idea but there is an issue that in K8s service it's fully mutable, on our case it can be changed after routingClass is changed. |
Depends on what the dashboard shows -- my assumption would be that it's the devfile (i.e. without plugins, etc), so it would take some work to propagate this info into the dashboard in the first place. If we're just showing DevWorkspaces, the editor would have to do quite a bit of work to remove meaningless (to the user) metadata fields, etc. |
The proposal we discussed today, at least to solve the "there's no straightforward way to match an endpoint in the devfile with a URL from a route/ingress created on the cluster" problem is to add a Flattened Devfile ConfigMap reference status:
# other fields...
flattenedDevfileConfigMap: <configmapname> |
Worth noting that the configmap name is derived directly from workspaceID: it's named |
Also, flattened devfile is not really devfile but DevWorkspaceTemplateSpec when devfile is DevWorkspaceTemplateSpecContent + Devfile Header https://github.com/devfile/api/blob/master/pkg/apis/workspaces/v1alpha2/devfile.go#L10 |
Is your feature request related to a problem? Please describe.
The fields available in a DevWorkspace's status are currently
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 anendpoint
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:.status.ideUrl
(perhaps to.status.mainUrl
?)type: ide
, which is clearly not useful for everyone.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.
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?)
The text was updated successfully, but these errors were encountered: