Skip to content

Commit

Permalink
Merge pull request #122438 from kannon92/splitfs-tests
Browse files Browse the repository at this point in the history
[KEP - 4191]: Use Cadvisor labels rather than hard coding them into kubelet
  • Loading branch information
k8s-ci-robot committed Mar 1, 2024
2 parents 235d4ff + d58ff6c commit 24267f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/kubelet/cadvisor/cadvisor_linux_test.go
Expand Up @@ -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",
Expand Down
7 changes: 1 addition & 6 deletions pkg/kubelet/cadvisor/helpers_linux.go
Expand Up @@ -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 {
Expand All @@ -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")
}
Expand Down

0 comments on commit 24267f6

Please sign in to comment.