From f5daa9e88fe2423215b1bda0dc76087cbc21587a Mon Sep 17 00:00:00 2001 From: Andrew Drake Date: Tue, 12 Nov 2019 15:22:44 -0500 Subject: [PATCH] Update CRI socket path to /var/run/cri.sock --- pkg/cri/cri.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/cri/cri.go b/pkg/cri/cri.go index fcaa35a2c3..33c01bd655 100644 --- a/pkg/cri/cri.go +++ b/pkg/cri/cri.go @@ -10,6 +10,11 @@ import ( log "github.com/cihub/seelog" ) +const ( + // TODO: Parameterize? + criSocketPath = "unix:///var/run/cri.sock" +) + // ContainerInfo provides container information type ContainerInfo struct { ID string @@ -28,8 +33,7 @@ func New() *Client { } func (c *Client) GetRunningContainers() (map[string]*ContainerInfo, error) { - // TODO: Parameterize socket path - conn, err := grpc.Dial("unix:///var/run/dockershim.sock", grpc.WithInsecure()) + conn, err := grpc.Dial(criSocketPath, grpc.WithInsecure()) if err != nil { return nil, err }