Bump cAdvisor to v0.43.0

Bumping cAdvisor from v0.39.2 -> v0.43.0

* Also pin transitive dependencies
  * containerd v1.4.9 -> v1.4.11
  * docker v20.10.2+incompatible> v20.10.7+incompatible

Signed-off-by: David Porter <david@porter.me>
This commit is contained in:
David Porter
2021-11-09 14:23:06 -08:00
parent e4adf7f31c
commit c6452be958
80 changed files with 1637 additions and 465 deletions

View File

@@ -963,6 +963,8 @@ type ContainerStats struct {
Resctrl ResctrlStats `json:"resctrl,omitempty"`
CpuSet CPUSetStats `json:"cpuset,omitempty"`
OOMEvents uint64 `json:"oom_events,omitempty"`
}
func timeEq(t1, t2 time.Time, tolerance time.Duration) bool {

View File

@@ -47,13 +47,16 @@ type Node struct {
}
type Core struct {
Id int `json:"core_id"`
Threads []int `json:"thread_ids"`
Caches []Cache `json:"caches"`
SocketID int `json:"socket_id"`
Id int `json:"core_id"`
Threads []int `json:"thread_ids"`
Caches []Cache `json:"caches"`
UncoreCaches []Cache `json:"uncore_caches"`
SocketID int `json:"socket_id"`
}
type Cache struct {
// Id of memory cache
Id int `json:"id"`
// Size of memory cache in bytes.
Size uint64 `json:"size"`
// Type of memory cache: data, instruction, or unified.
@@ -175,6 +178,9 @@ type MachineInfo struct {
// The time of this information point.
Timestamp time.Time `json:"timestamp"`
// Vendor id of CPU.
CPUVendorID string `json:"vendor_id"`
// The number of cores in this machine.
NumCores int `json:"num_cores"`
@@ -246,6 +252,7 @@ func (m *MachineInfo) Clone() *MachineInfo {
}
}
copy := MachineInfo{
CPUVendorID: m.CPUVendorID,
Timestamp: m.Timestamp,
NumCores: m.NumCores,
NumPhysicalCores: m.NumPhysicalCores,

View File

@@ -263,7 +263,7 @@ type FsInfo struct {
}
type RequestOptions struct {
// Type of container identifier specified - "name", "dockerid", dockeralias"
// Type of container identifier specified - TypeName (default) or TypeDocker
IdType string `json:"type"`
// Number of stats to return
Count int `json:"count"`

View File

@@ -18,8 +18,9 @@ import (
"fmt"
"time"
"github.com/google/cadvisor/info/v1"
"k8s.io/klog/v2"
v1 "github.com/google/cadvisor/info/v1"
)
func machineFsStatsFromV1(fsStats []v1.FsStats) []MachineFsStats {

View File

@@ -18,7 +18,7 @@ import (
// TODO(rjnagal): Move structs from v1.
"time"
"github.com/google/cadvisor/info/v1"
v1 "github.com/google/cadvisor/info/v1"
)
type Attributes struct {