Skip to main content

resource

Source: base/pkg/kusion_models/kube/frontend/resource/resource.k

Schema Resource

Resource describes the compute resource requirements.

Attributes

Name and DescriptionTypeDefault ValueRequired
cpu
A Container-level attribute.
CPU, in cores, default 1 core. (500m = .5 cores)
int | number_multiplier1optional
memory
A Container-level attribute.
Memory, in bytes, default 1024Mi. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
number_multiplier1024Mioptional
disk
A Container-level attribute.
Local disk storage, in bytes, default 10Gi. (500Gi = 500GiB = 500 * 1024 * 1024 * 1024)
number_multiplier10Gioptional

Examples

import base.pkg.kusion_models.kube.frontend.resource as res

res = res.Resource {
cpu = 2
memory = 2048Mi
disk = 20Gi
}