Authoring devfiles - Components
Limiting resources usage
This section describes how to limit resource use in devfiles.
Procedure
Specify container memory limit and memory request for components
To specify a container memory limit for
container, use thememoryLimitparameter and for the container memory request, use thememoryRequestparameter:Specify container memory limit and memory request for components
devfile.yamlcomponents: - name: maven container: image: eclipse/maven-jdk8:latest memoryLimit: 512M memoryRequest: 256MSpecify container CPU limit and container CPU request for components
To specify a container CPU limit for
container, use thecpuLimitparameter and for the CPU request, use thecpuRequestparameter:Specify container CPU limit and CPU request for components
devfile.yamlcomponents: - name: maven container: image: eclipse/maven-jdk8:latest cpuLimit: 750m cpuRequest: 450mWhen not specified, the values may or may not be inferred from the application that consumes the devfile or from the underlying platform (for example, Kubernetes).