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