mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
vendor update for CSI 0.3.0
This commit is contained in:
7
vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux.go
generated
vendored
7
vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_linux.go
generated
vendored
@ -109,9 +109,10 @@ func New(address string, port uint, imageFsInfoProvider ImageFsInfoProvider, roo
|
||||
sysFs := sysfs.NewRealSysFs()
|
||||
|
||||
ignoreMetrics := cadvisormetrics.MetricSet{
|
||||
cadvisormetrics.NetworkTcpUsageMetrics: struct{}{},
|
||||
cadvisormetrics.NetworkUdpUsageMetrics: struct{}{},
|
||||
cadvisormetrics.PerCpuUsageMetrics: struct{}{},
|
||||
cadvisormetrics.NetworkTcpUsageMetrics: struct{}{},
|
||||
cadvisormetrics.NetworkUdpUsageMetrics: struct{}{},
|
||||
cadvisormetrics.PerCpuUsageMetrics: struct{}{},
|
||||
cadvisormetrics.ProcessSchedulerMetrics: struct{}{},
|
||||
}
|
||||
if !usingLegacyStats {
|
||||
ignoreMetrics[cadvisormetrics.DiskUsageMetrics] = struct{}{}
|
||||
|
8
vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_windows.go
generated
vendored
8
vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/cadvisor_windows.go
generated
vendored
@ -26,6 +26,7 @@ import (
|
||||
)
|
||||
|
||||
type cadvisorClient struct {
|
||||
rootPath string
|
||||
winStatsClient winstats.Client
|
||||
}
|
||||
|
||||
@ -34,7 +35,10 @@ var _ Interface = new(cadvisorClient)
|
||||
// New creates a cAdvisor and exports its API on the specified port if port > 0.
|
||||
func New(address string, port uint, imageFsInfoProvider ImageFsInfoProvider, rootPath string, usingLegacyStats bool) (Interface, error) {
|
||||
client, err := winstats.NewPerfCounterClient()
|
||||
return &cadvisorClient{winStatsClient: client}, err
|
||||
return &cadvisorClient{
|
||||
rootPath: rootPath,
|
||||
winStatsClient: client,
|
||||
}, err
|
||||
}
|
||||
|
||||
func (cu *cadvisorClient) Start() error {
|
||||
@ -70,7 +74,7 @@ func (cu *cadvisorClient) ImagesFsInfo() (cadvisorapiv2.FsInfo, error) {
|
||||
}
|
||||
|
||||
func (cu *cadvisorClient) RootFsInfo() (cadvisorapiv2.FsInfo, error) {
|
||||
return cadvisorapiv2.FsInfo{}, nil
|
||||
return cu.GetDirFsInfo(cu.rootPath)
|
||||
}
|
||||
|
||||
func (cu *cadvisorClient) WatchEvents(request *events.Request) (*events.EventChannel, error) {
|
||||
|
2
vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/helpers_linux.go
generated
vendored
2
vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/helpers_linux.go
generated
vendored
@ -38,8 +38,6 @@ func (i *imageFsInfoProvider) ImageFsInfoLabel() (string, error) {
|
||||
switch i.runtime {
|
||||
case types.DockerContainerRuntime:
|
||||
return cadvisorfs.LabelDockerImages, nil
|
||||
case types.RktContainerRuntime:
|
||||
return cadvisorfs.LabelRktImages, nil
|
||||
case types.RemoteContainerRuntime:
|
||||
// This is a temporary workaround to get stats for cri-o from cadvisor
|
||||
// and should be removed.
|
||||
|
3
vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/util.go
generated
vendored
3
vendor/k8s.io/kubernetes/pkg/kubelet/cadvisor/util.go
generated
vendored
@ -75,7 +75,6 @@ func EphemeralStorageCapacityFromFsInfo(info cadvisorapi2.FsInfo) v1.ResourceLis
|
||||
// https://github.com/kubernetes/kubernetes/issues/51798
|
||||
// UsingLegacyCadvisorStats returns true if container stats are provided by cadvisor instead of through the CRI
|
||||
func UsingLegacyCadvisorStats(runtime, runtimeEndpoint string) bool {
|
||||
return runtime == kubetypes.RktContainerRuntime ||
|
||||
(runtime == kubetypes.DockerContainerRuntime && goruntime.GOOS == "linux") ||
|
||||
return (runtime == kubetypes.DockerContainerRuntime && goruntime.GOOS == "linux") ||
|
||||
runtimeEndpoint == CrioSocket
|
||||
}
|
||||
|
Reference in New Issue
Block a user