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