Remove the workaround of heapster panic

pull/8/head
Pengfei Ni 2018-04-09 09:43:39 +08:00
parent d39bfa0d13
commit a757a69b45
2 changed files with 3 additions and 11 deletions

View File

@ -61,7 +61,6 @@ go_library(
"//pkg/kubelet/types:go_default_library",
"//pkg/volume:go_default_library",
"//vendor/github.com/golang/glog:go_default_library",
"//vendor/github.com/golang/protobuf/proto:go_default_library",
"//vendor/github.com/google/cadvisor/fs:go_default_library",
"//vendor/github.com/google/cadvisor/info/v1:go_default_library",
"//vendor/github.com/google/cadvisor/info/v2:go_default_library",

View File

@ -25,7 +25,6 @@ import (
"time"
"github.com/golang/glog"
"github.com/golang/protobuf/proto"
cadvisorfs "github.com/google/cadvisor/fs"
cadvisorapiv2 "github.com/google/cadvisor/info/v2"
@ -301,15 +300,9 @@ func (p *criStatsProvider) makeContainerStats(
Name: stats.Attributes.Metadata.Name,
// The StartTime in the summary API is the container creation time.
StartTime: metav1.NewTime(time.Unix(0, container.CreatedAt)),
// Work around heapster bug. https://github.com/kubernetes/kubernetes/issues/54962
// TODO(random-liu): Remove this after heapster is updated to newer than 1.5.0-beta.0.
CPU: &statsapi.CPUStats{
UsageNanoCores: proto.Uint64(0),
},
Memory: &statsapi.MemoryStats{
RSSBytes: proto.Uint64(0),
},
Rootfs: &statsapi.FsStats{},
CPU: &statsapi.CPUStats{},
Memory: &statsapi.MemoryStats{},
Rootfs: &statsapi.FsStats{},
// UserDefinedMetrics is not supported by CRI.
}
if stats.Cpu != nil {