ResourceQuantity#
- pydantic model controller.models.v1.lab.ResourceQuantity#
A Kubernetes resource request or limit.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "ResourceQuantity", "description": "A Kubernetes resource request or limit.", "type": "object", "properties": { "cpu": { "description": "Number of CPU cores. Accepts any valid Kubernetes CPU resource specification, which is either a whole number of millicores suffixed with m, like 500m, or a decimal number representing whole cores, with up to 3 decimal places, like 1.234", "examples": [ 1.5, "500m", "1.5" ], "title": "CPU", "type": "number" }, "memory": { "description": "Amount of memory in bytes. Also accepts strings with SI suffixes, which will be converted to bytes. Be sure to use the suffix with ``i`` to indicate powers of two (1024 rather than 1000) if that is desired.", "examples": [ 1073741824, "1Gi", "1073741824" ], "title": "Memory", "type": "integer" } }, "required": [ "cpu", "memory" ] }
- Fields:
- field cpu: Annotated[float, Field(title='CPU', description='Number of CPU cores. Accepts any valid Kubernetes CPU resource specification, which is either a whole number of millicores suffixed with m, like 500m, or a decimal number representing whole cores, with up to 3 decimal places, like 1.234', examples=[1.5, '500m', '1.5']), BeforeValidator(cpu_to_cores)] [Required]#
Number of CPU cores. Accepts any valid Kubernetes CPU resource specification, which is either a whole number of millicores suffixed with m, like 500m, or a decimal number representing whole cores, with up to 3 decimal places, like 1.234
- Constraints:
func = <function cpu_to_cores at 0x7f93a62f1e40>
json_schema_input_type = PydanticUndefined
-
field memory: Annotated[int, Field(title='Memory', description='Amount of memory in bytes. Also accepts strings with SI suffixes, which will be converted to bytes. Be sure to use the suffix with
i
to indicate powers of two (1024 rather than 1000) if that is desired.', examples=[1073741824, '1Gi', '1073741824']), BeforeValidator(memory_to_bytes)] [Required]# Amount of memory in bytes. Also accepts strings with SI suffixes, which will be converted to bytes. Be sure to use the suffix with
i
to indicate powers of two (1024 rather than 1000) if that is desired.- Constraints:
func = <function memory_to_bytes at 0x7f93a6477740>
json_schema_input_type = PydanticUndefined