From fd7fcbddfe316bad7e6c7fe40abded2a79796fb5 Mon Sep 17 00:00:00 2001 From: Hao Fan Date: Mon, 10 Jun 2024 00:22:17 +0800 Subject: [PATCH] return pod qos in advance --- pkg/utils/qos.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/utils/qos.go b/pkg/utils/qos.go index c0aed053a..c7989a98b 100644 --- a/pkg/utils/qos.go +++ b/pkg/utils/qos.go @@ -20,6 +20,10 @@ func isSupportedQoSComputeResource(name v1.ResourceName) bool { // 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. func GetPodQOS(pod *v1.Pod) v1.PodQOSClass { + if len(pod.Status.QOSClass) != 0 { + return pod.Status.QOSClass + } + requests := v1.ResourceList{} limits := v1.ResourceList{} zeroQuantity := resource.MustParse("0")