-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support for devfile v2 parents #21098
Comments
It seems the kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
name: test-dw
spec:
started: true
routingClass: che
template:
parent:
uri: https://raw.githubusercontent.com/nils-mosbach/devfile.io-demo-che-parent/main/devfile.yaml
components:
- name: nodejsdev
container:
image: quay.io/devfile/universal-developer-image:ubi8-b452131
endpoints:
- exposure: public
name: nodejs
protocol: http
targetPort: 3000
memoryLimit: 1G
mountSources: true directly and the parent is resolved (the resulting pod contains the postgres container).
|
To isolate the Operators part of the process, you can try applying the following DevWorkspace directly to the cluster (in your user's Che namespace): kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
name: devfile-parent-test
spec:
started: true
routingClass: che
template:
projects:
- name: devfile-io-demo-che-child
git:
remotes:
origin: 'https://github.com/nils-mosbach/devfile.io-demo-che-child.git'
parent:
uri: https://raw.githubusercontent.com/nils-mosbach/devfile.io-demo-che-parent/main/devfile.yaml
components:
- name: nodejsdev
container:
image: quay.io/devfile/universal-developer-image:ubi8-b452131
endpoints:
- exposure: public
name: nodejs
protocol: http
targetPort: 3000
memoryLimit: 1G
mountSources: true
- name: theia-ide
plugin:
uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/eclipse/che-theia/next/devfile.yaml |
@amisevsk thank you for the investigation, it looks like UD ignores
? |
Looks like it is failing currently with
basically, DWO controller tries to resolve
as https://registry.devfile.io/nodejs whereas the actual link is https://registry.devfile.io/devfiles/nodejs |
DWO supports the same reference types as it does for plugins (registry + ID, URI, and DWT within the cluster). However, the devfile/api specification is not explicit in how I believe (this was a long time ago now) the reasoning was that you might want to use a registry for plugin devfiles, which might be stored at e.g. |
thanks, folks, for the investigation |
Closing. feel free to reopen if needed |
sync'd to Red Hat JIRA https://issues.redhat.com/browse/CRW-2747 |
Describe the bug
Based on the devfile 2.1 specification parent devfiles should be resolved if e.g.
parent.uri
is given. (Referring to a parent devfile in a devfile)That doesn't seem to work in the current version.
I've created a parent file that contains a database container, e.g.
https://github.com/nils-mosbach/devfile.io-demo-che-parent
And a child devfile that should inherit e.g. the database container from parent.
https://github.com/nils-mosbach/devfile.io-demo-che-child
The resulting workspace only contains the child devfile contents. Strange thing is, that at least there's a message
Resolved plugins and parents from DevWorkspace
in the devfiles log. See:Che version
next (development version)
Steps to reproduce
Run a devfile that references a parent devfile. e.g.
https://github.com/nils-mosbach/devfile.io-demo-che-child
Expected behavior
Child devworkspace should contain all components and settings from the parents' devfile.
Runtime
Kubernetes (vanilla)
Screenshots
No response
Installation method
chectl/next
Environment
Linux
Eclipse Che Logs
Release Notes Text
The Devfile v2 specification introduced the concept of
parent
that allow to refernce an existing Devfile. Che now supports that with DevWorkspace bassed workspaces.The text was updated successfully, but these errors were encountered: