mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
fix magic string for runtime type
This commit is contained in:
parent
2712540196
commit
81897022db
@ -22,6 +22,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
cadvisorfs "github.com/google/cadvisor/fs"
|
||||
"k8s.io/kubernetes/pkg/kubelet/types"
|
||||
)
|
||||
|
||||
// imageFsInfoProvider knows how to translate the configured runtime
|
||||
@ -35,11 +36,11 @@ type imageFsInfoProvider struct {
|
||||
// For remote runtimes, it handles additional runtimes natively understood by cAdvisor.
|
||||
func (i *imageFsInfoProvider) ImageFsInfoLabel() (string, error) {
|
||||
switch i.runtime {
|
||||
case "docker":
|
||||
case types.DockerContainerRuntime:
|
||||
return cadvisorfs.LabelDockerImages, nil
|
||||
case "rkt":
|
||||
case types.RktContainerRuntime:
|
||||
return cadvisorfs.LabelRktImages, nil
|
||||
case "remote":
|
||||
case types.RemoteContainerRuntime:
|
||||
// This is a temporary workaround to get stats for cri-o from cadvisor
|
||||
// and should be removed.
|
||||
// Related to https://github.com/kubernetes/kubernetes/issues/51798
|
||||
|
Loading…
Reference in New Issue
Block a user