Skip to content

Commit

Permalink
fixing deepsource issues
Browse files Browse the repository at this point in the history
  • Loading branch information
steiler committed Jun 11, 2021
1 parent 164cbf1 commit 26a7123
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions runtime/containerd/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ func (c *ContainerdRuntime) CreateContainer(ctx context.Context, node *types.Nod
return err
}

//s, _ := newContainer.Spec(ctx)
//fmt.Printf("%+v", s.Process)

log.Debugf("Container '%s' created", node.LongName)
log.Debugf("Start container: %s", node.LongName)

Expand Down Expand Up @@ -278,7 +281,7 @@ func (c *ContainerdRuntime) CreateContainer(ctx context.Context, node *types.Nod
return nil
}

func cniInit(cId string, ifName string, mgmtNet types.MgmtNet) (*libcni.CNIConfig, *libcni.NetworkConfigList, *libcni.RuntimeConf, error) {
func cniInit(cId, ifName string, mgmtNet types.MgmtNet) (*libcni.CNIConfig, *libcni.NetworkConfigList, *libcni.RuntimeConf, error) {
// allow overwriting cni plugin binary path via ENV var
cniPath, ok := os.LookupEnv("CNI_BIN")
if !ok {
Expand Down Expand Up @@ -497,14 +500,13 @@ func (c *ContainerdRuntime) filterStringBuilder(filter []*types.GenericFilter) s
isExistsOperator = true
}

switch filterEntry.FilterType {
case "label":
if filterEntry.FilterType == "label" {
filterstring = filterstring + "labels." + filterEntry.Field
if !isExistsOperator {
filterstring = filterstring + operator + filterEntry.Match + delim
}

}
} // more might be implemented later
delim = ","
}
log.Debug("Filterstring: " + filterstring)
Expand Down

0 comments on commit 26a7123

Please sign in to comment.