package qos

import "k8s.io/kubernetes/pkg/apis/core/v1/helper/qos"

Index

Functions

func ComputePodQOS

func ComputePodQOS(pod *v1.Pod) v1.PodQOSClass

ComputePodQOS evaluates the list of containers to determine a pod's QoS class. This function is more expensive than GetPodQOS which should be used for pods having a non-empty .Status.QOSClass. A pod is besteffort if none of its containers have specified any requests or limits. A pod is guaranteed only when requests and limits are specified for all the containers and they are equal. A pod is burstable if limits and requests do not match across all containers. TODO(ndixita): Refactor ComputePodQOS into smaller functions to make it more readable and maintainable.

func GetPodQOS

func GetPodQOS(pod *v1.Pod) v1.PodQOSClass

GetPodQOS returns the QoS class of a pod persisted in the PodStatus.QOSClass field. If PodStatus.QOSClass is empty, it returns value of ComputePodQOS() which evaluates pod's QoS class.

Types

type QOSList

type QOSList map[v1.ResourceName]v1.PodQOSClass

QOSList is a set of (resource name, QoS class) pairs.

Source Files

qos.go

Version
v1.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
3 hours ago

Tools for package owners.