Adding attributes to a devfile
Devfile attributes can be used to configure various features.
-
Define the optional
editorFree
attributeWhen an editor is not specified in a devfile, a default is provided. When no editor is needed, use the
editorFree
attribute. The default value offalse
means that the devfile requests the provisioning of the default editor.Example 1. A devfile without an editorschemaVersion: 2.0.0 metadata: name: petclinic-dev-environment components: - name: myApp kubernetes: local: my-app.yaml attributes: editorFree: true
-
Define the optional
persistVolumes
attribute (ephemeral mode)By default, volumes and PVCs specified in a devfile are bound to a host folder to persist data even after a container restart. To disable data persistence to make the workspace faster, such as when the volume back end is slow, modify the
persistVolumes
attribute in the devfile. The default value istrue
. Set tofalse
to useemptyDir
for configured volumes and PVC.Example 2. A devfile with ephemeral mode enabledschemaVersion: 2.0.0 metadata: name: petclinic-dev-environment projects: - name: petclinic git: remotes: origin: "https://github.com/che-samples/web-java-spring-petclinic.git" attributes: persistVolumes: false