Components
Defining environment variables
Environment variables are supported by the following component types: container
, plugin
, kubernetes
, openshift
. If the component has multiple containers, environment variables will be provisioned for each container.
Specify environment variables for
container
componentsSpecify environment variables for a container components
devfile.yamlschemaVersion: 2.0.0 metadata: name: MyDevfile components: - name: go container: image: golang memoryLimit: 512Mi mountSources: true command: ['sleep', 'infinity'] env: - name: GOPATH value: $(PROJECTS_ROOT)/go
Specify environment variables for
plugin
componentsSpecify environment variables for plugin components
devfile.yamlschemaVersion: 2.0.0 metadata: name: MyDevfile - name: theia-editor plugin: id: eclipse/che-theia/next memoryLimit: 2Gi env: - name: HOME value: $(CHE_PROJECTS_ROOT)
Note!
The variable expansion works between the environment variables, and it uses the Kubernetes convention for the variable references.
The predefined variables are available for use in custom definitions.