mirror of https://github.com/k3s-io/k3s
Merge pull request #25190 from ingvagabund/e2e-scheduler-predicates-validate-resource-limits
Automatic merge from submit-queue SchedulerPredicates e2e test: be more verbose about requested resource When ``validates resource limits of pods that are allowed to run [Conformance]`` test is run, logs could give more information about requested resource and say it is for cpu and in mili units. cpu is stored in m units here: ``` nodeToCapacityMap[node.Name] = capacity.MilliValue() ```pull/6/head
commit
27512dd0a1
|
@ -289,7 +289,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
|
|||
for _, pod := range pods.Items {
|
||||
_, found := nodeToCapacityMap[pod.Spec.NodeName]
|
||||
if found && pod.Status.Phase == api.PodRunning {
|
||||
framework.Logf("Pod %v requesting resource %v on Node %v", pod.Name, getRequestedCPU(pod), pod.Spec.NodeName)
|
||||
framework.Logf("Pod %v requesting resource cpu=%vm on Node %v", pod.Name, getRequestedCPU(pod), pod.Spec.NodeName)
|
||||
nodeToCapacityMap[pod.Spec.NodeName] -= getRequestedCPU(pod)
|
||||
}
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
|
|||
var podsNeededForSaturation int
|
||||
milliCpuPerPod := int64(500)
|
||||
for name, leftCapacity := range nodeToCapacityMap {
|
||||
framework.Logf("Node: %v has capacity: %v", name, leftCapacity)
|
||||
framework.Logf("Node: %v has cpu capacity: %vm", name, leftCapacity)
|
||||
podsNeededForSaturation += (int)(leftCapacity / milliCpuPerPod)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue