Adjust the acceptable value of UsageNanoCores

Signed-off-by: Harshal Patil <harpatil@redhat.com>
This commit is contained in:
Harshal Patil 2020-10-08 17:02:59 +05:30
parent 1a66eb7b8a
commit bff8109eb7

View File

@ -23,7 +23,7 @@ import (
"strings"
"time"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kubeletstatsv1alpha1 "k8s.io/kubelet/pkg/apis/stats/v1alpha1"
@ -90,7 +90,11 @@ var _ = framework.KubeDescribe("Summary API [NodeConformance]", func() {
"StartTime": recent(maxStartAge),
"CPU": ptrMatchAllFields(gstruct.Fields{
"Time": recent(maxStatsAge),
"UsageNanoCores": bounded(10000, 2e9),
// CRI stats provider tries to estimate the value of UsageNanoCores. This value can be
// either 0 or between 10000 and 2e9.
// Please refer, https://github.com/kubernetes/kubernetes/pull/95345#discussion_r501630942
// for more information.
"UsageNanoCores": gomega.SatisfyAny(gomega.BeZero(), bounded(10000, 2e9)),
"UsageCoreNanoSeconds": bounded(10000000, 1e15),
}),
"Memory": ptrMatchAllFields(gstruct.Fields{