Merge pull request #104909 from pacoxu/kubectl-qos

kubectl: include init containers when determining pod QoS
This commit is contained in:
Kubernetes Prow Robot
2021-11-01 20:00:58 -07:00
committed by GitHub
2 changed files with 15 additions and 11 deletions

View File

@@ -34,6 +34,7 @@ func isSupportedQoSComputeResource(name core.ResourceName) bool {
// 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.
// When this function is updated please also update staging/src/k8s.io/kubectl/pkg/util/qos/qos.go
func GetPodQOS(pod *core.Pod) core.PodQOSClass {
requests := core.ResourceList{}
limits := core.ResourceList{}