Module yaml

Module yaml 

Source
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.