Skip to content

Commit

Permalink
Removing deprecated call
Browse files Browse the repository at this point in the history
  • Loading branch information
deniszh committed Aug 13, 2024
1 parent dd3f6e7 commit 1c6a107
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/k8s/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/containerd/containerd"
"github.com/containerd/containerd/cio"
"github.com/containerd/containerd/namespaces"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/client"
"github.com/pkg/errors"
Expand Down Expand Up @@ -212,9 +212,7 @@ func getLocalContainers(cfg *conf.Main) (res map[string]contInfo, retErr error)
}
}()

//TODO: remove deprecated call
//lint:ignore SA1019
listOpts := types.ContainerListOptions{}
listOpts := container.ListOptions{}
listOpts.Filters = filters.NewArgs(filters.Arg("label", "io.kubernetes.container.name=POD"), filters.Arg("label", fmt.Sprintf("%s=%s", cfg.K8sSwitchLabelKey, cfg.K8sSwitchLabelVal)))
containers, err := client.ContainerList(context.Background(), listOpts)
if err != nil {
Expand Down

0 comments on commit 1c6a107

Please sign in to comment.