Skip to content

Full support for Devfile 2.x spec #17883

@sleshchenko

Description

@sleshchenko

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.

Devfile 2.0 Feature Supported Issue
Plugin mechanism removed from the spec devfile/api#333
Parent devfiles devfile/devworkspace-operator#346
Allow volumes to be shared across components devfile/devworkspace-operator#237
kubernetes component
projects
starterProjects
Components sourceMapping
Specify size of volume for component devfile/devworkspace-operator#827
Environment variables for a specific command
Commands group (application lifecycle)
Out of main pod containers
Stacks/Devfile matching rules not in the spec yet
Devfile metadata: add a link to an external website
Add lifecycle bindings to bind commands to specific events pre-start only devfile/devworkspace-operator#629
Containers endpoints (routes/ingresses)
New type of command to apply a component
Run exec commands as specified user
hotReloadCapable
image component #21187
outer loop components of type image and kubernetes #21186

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/devfile-specIssues related to Devfile v2engine/devworkspaceIssues related to Che configured to use the devworkspace controller as workspace engine.kind/epicA long-lived, PM-driven feature request. Must include a checklist of items that must be completed.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.roadmap/1-yearEpics that are planned to complete in the short term (12 months or more)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions