Refering to a parent devfile in a devfile
It is possible to refer to another devfile as a parent to a given devfile. If a parent is specified, the devfile will inherit all behaviour from the parent. Part of the content of the parent can be overridden in the child devfile. That allows refering a devfile (the parent) from a distinct devfile and makes it possible to reuse in multiple devfiles the same parent (the stack).
A parent devfile can be referenced in 3 different ways:
kubernetes.Example 1. Parent referred by registry
idif it has been published in a registry.
schemaVersion: 2.0.0 metadata: name: my-project-dev parent: id: redhat/nodejs/11.6 registry: https://devfile-registry.io/Example 2. Parent referred by uri
Using the URI if it has been published on a static http server (like gist or pastebin).
schemaVersion: 2.0.0 metadata: name: my-project-dev parent: id: redhat/nodejs/11.6 uri: https://raw.githubusercontent.com/eclipse/che-devfile-registry/master/devfiles/nodejs/devfile.yamlExample 3. Parent identified by a Kubernetes resource
Using a Kubernetes resource name, namespace and selector if it has been deployed on a Kubernete cluster.
schemaVersion: 2.0.0 metadata: name: my-project-dev parent: kubernetes: name: mydevworkspacetemplate namespace: mynamespace selector: mykey=myvalue