mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
remove unused param
This commit is contained in:
parent
0efb70c0a2
commit
e56d40d048
@ -120,7 +120,7 @@ func (p *cadvisorStatsProvider) ListPodStats() ([]statsapi.PodStats, error) {
|
|||||||
if containerName == leaky.PodInfraContainerName {
|
if containerName == leaky.PodInfraContainerName {
|
||||||
// Special case for infrastructure container which is hidden from
|
// Special case for infrastructure container which is hidden from
|
||||||
// the user and has network stats.
|
// the user and has network stats.
|
||||||
podStats.Network = cadvisorInfoToNetworkStats("pod:"+ref.Namespace+"_"+ref.Name, &cinfo)
|
podStats.Network = cadvisorInfoToNetworkStats(&cinfo)
|
||||||
} else {
|
} else {
|
||||||
podStats.Containers = append(podStats.Containers, *cadvisorInfoToContainerStats(containerName, &cinfo, &rootFsInfo, &imageFsInfo))
|
podStats.Containers = append(podStats.Containers, *cadvisorInfoToContainerStats(containerName, &cinfo, &rootFsInfo, &imageFsInfo))
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ func (p *criStatsProvider) addPodNetworkStats(
|
|||||||
caPodSandbox, found := caInfos[podSandboxID]
|
caPodSandbox, found := caInfos[podSandboxID]
|
||||||
// try get network stats from cadvisor first.
|
// try get network stats from cadvisor first.
|
||||||
if found {
|
if found {
|
||||||
networkStats := cadvisorInfoToNetworkStats(ps.PodRef.Name, &caPodSandbox)
|
networkStats := cadvisorInfoToNetworkStats(&caPodSandbox)
|
||||||
if networkStats != nil {
|
if networkStats != nil {
|
||||||
ps.Network = networkStats
|
ps.Network = networkStats
|
||||||
return
|
return
|
||||||
|
@ -164,7 +164,7 @@ func cadvisorInfoToProcessStats(info *cadvisorapiv2.ContainerInfo) *statsapi.Pro
|
|||||||
|
|
||||||
// cadvisorInfoToNetworkStats returns the statsapi.NetworkStats converted from
|
// cadvisorInfoToNetworkStats returns the statsapi.NetworkStats converted from
|
||||||
// the container info from cadvisor.
|
// the container info from cadvisor.
|
||||||
func cadvisorInfoToNetworkStats(name string, info *cadvisorapiv2.ContainerInfo) *statsapi.NetworkStats {
|
func cadvisorInfoToNetworkStats(info *cadvisorapiv2.ContainerInfo) *statsapi.NetworkStats {
|
||||||
if !info.Spec.HasNetwork {
|
if !info.Spec.HasNetwork {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ func (p *StatsProvider) GetCgroupStats(cgroupName string, updateStats bool) (*st
|
|||||||
}
|
}
|
||||||
// Rootfs and imagefs doesn't make sense for raw cgroup.
|
// Rootfs and imagefs doesn't make sense for raw cgroup.
|
||||||
s := cadvisorInfoToContainerStats(cgroupName, info, nil, nil)
|
s := cadvisorInfoToContainerStats(cgroupName, info, nil, nil)
|
||||||
n := cadvisorInfoToNetworkStats(cgroupName, info)
|
n := cadvisorInfoToNetworkStats(info)
|
||||||
return s, n, nil
|
return s, n, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user