File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ import (
25
25
corev1 "k8s.io/api/core/v1"
26
26
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
27
27
client "k8s.io/client-go/kubernetes"
28
- "k8s.io/klog/v2"
29
28
podresourcesapi "k8s.io/kubelet/pkg/apis/podresources/v1"
30
29
31
30
"github.com/k8stopologyawareschedwg/noderesourcetopology-api/pkg/apis/topology/v1alpha2"
@@ -69,16 +68,16 @@ func (resMon *PodResourcesScanner) isWatchable(podResource *podresourcesapi.PodR
69
68
return false , false , err
70
69
}
71
70
72
- podHasExclusiveCPUs := hasExclusiveCPUs (pod )
71
+ isPodHasIntegralCPUs := podHasIntegralCPUs (pod )
73
72
isPodGuaranteed := qos .GetPodQOS (pod ) == corev1 .PodQOSGuaranteed
74
73
75
- return isPodGuaranteed || hasDevice (podResource ), podHasExclusiveCPUs , nil
74
+ return isPodGuaranteed || hasDevice (podResource ), isPodHasIntegralCPUs , nil
76
75
}
77
76
78
- // hasExclusiveCPUs returns true if a guaranteed pod is allocated exclusive CPUs else returns false.
77
+ // podHasIntegralCPUs returns true if a guaranteed pod is allocated exclusive CPUs else returns false.
79
78
// In isWatchable() function we check for the pod QoS and proceed if it is guaranteed (i.e. request == limit)
80
79
// and hence we only check for request in the function below.
81
- func hasExclusiveCPUs (pod * corev1.Pod ) bool {
80
+ func podHasIntegralCPUs (pod * corev1.Pod ) bool {
82
81
for _ , container := range pod .Spec .InitContainers {
83
82
if hasIntegralCPUs (& container ) {
84
83
return true
You can’t perform that action at this time.
0 commit comments