Expand description
Resource specification parsing utilities.
Parses Kubernetes resource values (CPU and memory) from their string representations to numeric values for comparison and calculation.
Functionsยง
- bytes_
to_ memory_ string - Convert bytes to a human-readable memory string (using binary units).
- cpu_
limit_ to_ request_ ratio - Calculate the limit to request ratio for CPU.
- detect_
workload_ type - Detect workload type from container image and name.
- extract_
container_ image - Extract image from a container YAML value.
- extract_
container_ name - Extract container name from a container YAML value.
- extract_
resources - Extract resources from a container YAML value.
- memory_
limit_ to_ request_ ratio - Calculate the limit to request ratio for memory.
- millicores_
to_ cpu_ string - Convert millicores to a human-readable CPU string.
- parse_
cpu_ to_ millicores - Parse a CPU value string to millicores.
- parse_
memory_ to_ bytes - Parse a memory value string to bytes.