Make kubelet report usageNanoCores for node on Windows

This commit is contained in:
Angela Li
2019-07-18 15:20:53 -07:00
parent 5be1efe9bd
commit 3764360ccc
4 changed files with 77 additions and 4 deletions

View File

@@ -34,6 +34,10 @@ const (
// Perf counters are updated every second. This is the same as the default cadvisor collection period
// see https://github.com/google/cadvisor/blob/master/docs/runtime_options.md#housekeeping
perfCounterUpdatePeriod = 1 * time.Second
// defaultCachePeriod is the default cache period for each cpuUsage.
// This matches with the cadvisor setting and the time interval we use for containers.
// see https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/cadvisor/cadvisor_linux.go#L63
defaultCachePeriod = 10 * time.Second
)
type perfCounter struct {