Adding attributes to a devfile
Devfile attributes can be used to configure various features.
-
Define the optional
editorFreeattributeWhen an editor is not specified in a devfile, a default is provided. When no editor is needed, use the
editorFreeattribute. The default value offalsemeans 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
persistVolumesattribute (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
persistVolumesattribute in the devfile. The default value istrue. Set tofalseto useemptyDirfor 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