From b517d640a418f30dbc3c5bd5eb4fe5e8e26ab231 Mon Sep 17 00:00:00 2001 From: Sergey Kanzhelev Date: Thu, 2 Feb 2023 18:21:39 +0000 Subject: [PATCH] small comment the ephemeral containers are not accounted for the QoS calculation --- pkg/apis/core/helper/qos/qos.go | 1 + staging/src/k8s.io/kubectl/pkg/util/qos/qos.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/apis/core/helper/qos/qos.go b/pkg/apis/core/helper/qos/qos.go index 5f9c2604f07..8401cb6c300 100644 --- a/pkg/apis/core/helper/qos/qos.go +++ b/pkg/apis/core/helper/qos/qos.go @@ -40,6 +40,7 @@ func GetPodQOS(pod *core.Pod) core.PodQOSClass { limits := core.ResourceList{} zeroQuantity := resource.MustParse("0") isGuaranteed := true + // note, ephemeral containers are not considered for QoS as they cannot define resources allContainers := []core.Container{} allContainers = append(allContainers, pod.Spec.Containers...) allContainers = append(allContainers, pod.Spec.InitContainers...) diff --git a/staging/src/k8s.io/kubectl/pkg/util/qos/qos.go b/staging/src/k8s.io/kubectl/pkg/util/qos/qos.go index 2715e637525..2270691f51f 100644 --- a/staging/src/k8s.io/kubectl/pkg/util/qos/qos.go +++ b/staging/src/k8s.io/kubectl/pkg/util/qos/qos.go @@ -37,6 +37,7 @@ func GetPodQOS(pod *core.Pod) core.PodQOSClass { limits := core.ResourceList{} zeroQuantity := resource.MustParse("0") isGuaranteed := true + // note, ephemeral containers are not considered for QoS as they cannot define resources allContainers := []core.Container{} allContainers = append(allContainers, pod.Spec.Containers...) allContainers = append(allContainers, pod.Spec.InitContainers...)