che
che copied to clipboard
Full support for Devfile 2.x spec
Is your enhancement related to a problem? Please describe.
Currently, devworkspace controller supports only limited of devfile 2.x format. This is epic to track which parts needs to be implemented.
schemaVersion: 2.0.0
metadata:
name: nodejs-stack
projects:
- name: project
git:
remotes: # The only one remote is supported on Che Theia side
origin: "https://github.com/che-samples/web-nodejs-sample.git"
components:
- name: editor
plugin:
id: eclipse/che-theia/7.1.0
- name: terminal
plugin:
id: eclipse/che-machine-exec-plugin/7.1.0
- name: typescript-plugin
plugin:
id: che-incubator/typescript/1.30.2 # patching of plugins configuration are not supported yet
components:
- name: "??"
container:
memoryLimit: 512Mi
- name: nodejs
container:
image: quay.io/eclipse/che-nodejs10-ubi:nightly
memoryLimit: 512Mi
endpoints:
- name: nodejs
protocol: http
targetPort: 3000
mountSources: true
- name: cleanup-job
kubernetes:
inlined: |
apiVersion: batch/v1
kind: Job
metadata:
name: pi
spec:
template:
spec:
containers:
- name: job
image: someimage
command: ["some", "command", "with", "parameters"]
restartPolicy: Never
backoffLimit: 4
- name: postgres
kubernetes: # kubernete component is not supported yet
inlined: |
kind: Deployment
metadata:
name: pi
spec:
template:
spec:
containers:
- name: job
image: someimage
command: ["some", "command", "with", "parameters"]
restartPolicy: Never
backoffLimit: 4
volumes: ## volumes are not implemented on that level
- name: ...
commands:
- id: download dependencies
exec:
component: nodejs
commandLine: npm install
workingDir: ${PROJECTS_ROOT}/project/app
group:
kind: build # groups are not supported yet
commands:
- id: cleanup-job
apply:
component: cleanup-job
events:
postStop:
- cleanup-job
preStop: ...
preStart: ...
postStart: ...
This issue is not well-described yet. More details will be provided soon.
We should separate the compatibility requirements into two categories: there are parts of the devfile that impact how objects are created on the cluster (e.g. out of pod containers, etc.) and parts that are data to be passed to other components (e.g. commands, projects). For many of the elements listed above, all the devworkspace controller can do is pass data to Theia in a way that Theia will understand.
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.
Closing. We will implement missing parts of the spec when there is a real request.
@l0rd can you define what "real request" is?
@vaidotasp I think it makes sense to re-open this issue so that we can track what's supported and what's not.
I am not sure why I closed it but we are continuously working on supporting the v2 spec (and we have implemented a big part of it already). And we want to prioritize the features that are required in users/customers scenarios (i.e. "real request") rather than guessing what will be useful and what not (for example I would be careful to implement postStop events today as I am not aware of any scenario that would require that).
I have updated the description with what is supported today. We should probably clean it up because there are new fields (i.e. image components) that have been added in the meantime. @amisevsk @AObuchow please have a look.
/remove-lifecycle stale
Support for setting annotations on services and endpoints should probably be added to the list.
Also, support for Specifying size of volume component wasn't solved by https://github.com/devfile/devworkspace-operator/pull/827. Instead, Compute required size for per-workspace PVC when all volumes have sizes specified would be a more relevant issue.
@amisevsk correct me if I am wrong, but it seems like the projects and sourceMapping features are supported and can be updated in the table.
Additionally, kubernetes components will be supported once https://github.com/devfile/devworkspace-operator/pull/961 is merged.
components.volume.size is now supported in DWO when using the per-workspace storage strategy. See https://github.com/devfile/devworkspace-operator/pull/1020
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.
/remove-lifecycle stale
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.
/remove-lifecycle stale