mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 19:23:40 +00:00
allow for cadvisor to detect split filesystem and add some e2e tests
This commit is contained in:
parent
3df07e446b
commit
d58ff6c056
@ -68,7 +68,7 @@ func TestContainerFsInfoLabel(t *testing.T) {
|
||||
}{{
|
||||
description: "LabelCrioWriteableImages should be returned",
|
||||
runtimeEndpoint: crio.CrioSocket,
|
||||
expectedLabel: LabelCrioContainers,
|
||||
expectedLabel: cadvisorfs.LabelCrioContainers,
|
||||
expectedError: nil,
|
||||
}, {
|
||||
description: "Cannot find valid imagefs label",
|
||||
|
@ -26,11 +26,6 @@ import (
|
||||
cadvisorfs "github.com/google/cadvisor/fs"
|
||||
)
|
||||
|
||||
// LabelCrioContainers is a label to allow for cadvisor to track writeable layers
|
||||
// separately from read-only layers.
|
||||
// Once CAdvisor upstream changes are merged, we should remove this constant
|
||||
const LabelCrioContainers string = "crio-containers"
|
||||
|
||||
// imageFsInfoProvider knows how to translate the configured runtime
|
||||
// to its file system label for images.
|
||||
type imageFsInfoProvider struct {
|
||||
@ -50,7 +45,7 @@ func (i *imageFsInfoProvider) ImageFsInfoLabel() (string, error) {
|
||||
// For remote runtimes, it handles addition runtimes natively understood by cAdvisor.
|
||||
func (i *imageFsInfoProvider) ContainerFsInfoLabel() (string, error) {
|
||||
if detectCrioWorkaround(i) {
|
||||
return LabelCrioContainers, nil
|
||||
return cadvisorfs.LabelCrioContainers, nil
|
||||
}
|
||||
return "", fmt.Errorf("no containerfs label for configured runtime")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user