Skip to content

Support Devfile v2 outer loop components of type image and kubernetes #21186

@l0rd

Description

@l0rd

Is your enhancement related to a problem? Please describe

Che currently ignores these component types although they are used in registry.devfile.io samples.

👉 Note that this issue is only about the “outer loop” implementation of these components. Outer loop means that the components are created after a workspace start-up to test in a prod like deployment. There is a separate issue for inner loop support.

A component is considered “outer loop” if any of these conditions apply (c.f. https://github.com/devfile/library/pull/127/files):

  • it’s associated to a command of type apply
  • it’s a kubernetes or openshift and has deployByDefault: false (the version of the spec is 2.2 or higher)
  • it’s an image (and do NOT have autoBuild: true) (the version of the spec is 2.2 or higher)

Describe the solution you'd like

Pre-process the Devfile to replace the outer loop component with an exec command:

  • kubernetes or openshift components are replaced with a kubectl apply or oc apply command in the dev component
  • image components are replaced with a command that does a build, in this case the command is configurable as there are multiple options like buildah, kaniko, docker build or oc start-build on OCP.

2 alternative approaches

The “outer loop” components replacement with exec commands can be a responsibility of the dashboard OR of the IDEs.

Plus if it’s done by the dashboard: it works for any IDE
Plus if it’s done by the IDEs: it works for scenarios without Che dashboard (i.e. k apply -f devworkspace.yaml)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/dashboardarea/editorskind/enhancementA feature request - must adhere to the feature request template.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.severity/P1Has a major impact to usage or development of the system.status/analyzingAn issue has been proposed and it is currently being analyzed for effort and implementation approach

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions