Components
Adding plugin components
This section describes how to add a plugin
component to a devfile.
Prerequisites
Procedure
Define a component using the type
plugin
.Define the
id
attribute. It is slash-separated publisher, name and version of plugin from the Plugin registry. List of available {prod-short} plugins and more information about registry can be found in the {prod-short} plugin registry GitHub repository.A devfile defining a plugin id
devfile.yamlcomponents: - name: exec-plugin plugin: id: machine-exec-plugin/0.0.1
Optionally, specify an alternative component registry using the
registryUrl
parameter:A devfile defining a plugin id and an alternative component registry
devfile.yamlcomponents: - name: exec-plugin plugin: id: machine-exec-plugin/0.0.1 registryUrl: https://my-customregistry.com
Optionally, provide a direct link to the component descriptor (typically named
meta.yaml
) using thereference
attribute, instead of using theid
.A devfile defining a plugin with a direct link to the component descriptor
devfile.yamlcomponents: - name: exec-plugin plugin: reference: https://raw.githubusercontent.com.../plugin/1.0.1/meta.yaml
Note!
It is impossible to mix the
id
andreference
fields in a single component definition; they are mutually exclusive.Optionally, provide plugin component configuration using the
preferences
attributeConfiguring JVM using plugin preferences
devfile.yamlid: redhat/java/0.38.0 plugin: preferences: java.jdt.ls.vmargs: '-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication'
Configuring preferences as an array
devfile.yamlid: redhat/java/0.38.0 plugin: preferences: go.lintFlags: ["--enable-all", "--new"]