Skip to content

Commit

Permalink
Avoid using container/podman in manager.go
Browse files Browse the repository at this point in the history
Signed-off-by: Davanum Srinivas <[email protected]>
  • Loading branch information
dims authored and Creatone committed Oct 31, 2023
1 parent d19df4f commit 2129e1c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"github.com/google/cadvisor/cache/memory"
"github.com/google/cadvisor/collector"
"github.com/google/cadvisor/container"
"github.com/google/cadvisor/container/podman"
"github.com/google/cadvisor/container/raw"
"github.com/google/cadvisor/events"
"github.com/google/cadvisor/fs"
Expand Down Expand Up @@ -274,7 +273,7 @@ type manager struct {
}

func (m *manager) PodmanContainer(containerName string, query *info.ContainerInfoRequest) (info.ContainerInfo, error) {
container, err := m.namespacedContainer(containerName, podman.Namespace)
container, err := m.namespacedContainer(containerName, PodmanNamespace)
if err != nil {
return info.ContainerInfo{}, err
}
Expand Down Expand Up @@ -1386,7 +1385,7 @@ func (m *manager) containersInfo(containers map[string]*containerData, query *in
}

func (m *manager) AllPodmanContainers(query *info.ContainerInfoRequest) (map[string]info.ContainerInfo, error) {
containers := m.getAllNamespacedContainers(podman.Namespace)
containers := m.getAllNamespacedContainers(PodmanNamespace)
return m.containersInfo(containers, query)
}

Expand Down

0 comments on commit 2129e1c

Please sign in to comment.