Authoring devfiles - Components
Adding a volume component
You can use a volume component to share files among container components and collaborate with other teams during the development process. Volumes mounted in a container require a volume component with the same name. Volume components can be shared across container components.
Prerequisites
Procedure
Add a
volumecomponent and specify the size of it.Minimal volume example
devfile.yamlschemaVersion: 2.2.0 metadata: name: mydevfile components: - name: mydevfile container: image: golang memoryLimit: 512Mi mountSources: true command: ['sleep', 'infinity'] volumeMounts: - name: cache path: /.cache - name: cache volume: size: 2GiIf you do not want your
volumecomponent to persist across restarts, specify it as ephemeral.Ephemeral volume example
devfile.yamlschemaVersion: 2.2.0 metadata: name: mydevfile components: - name: mydevfile volume: ephemeral: true size: 200G
Note!
Specifying the size of a volume component is dependent on the tools you use and might be subject to the limitations of the tools.