From 52827444ac286bccda591edf53473f3ad647d5a5 Mon Sep 17 00:00:00 2001 From: Clive Zhang Date: Wed, 27 Mar 2019 16:27:15 +0800 Subject: [PATCH] Transfer PATH environment variable when delegating weave --- pkg/cnidel/cnidel.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/cnidel/cnidel.go b/pkg/cnidel/cnidel.go index 427cd52f..486306cb 100644 --- a/pkg/cnidel/cnidel.go +++ b/pkg/cnidel/cnidel.go @@ -164,6 +164,11 @@ func getExecCniParams(cniType string, netInfo *danmtypes.DanmNet, ep *danmtypes. "CNI_ARGS=" + os.Getenv("CNI_ARGS"), "CNI_PATH=" + os.Getenv("CNI_PATH"), } + if cniType == "weave-net" { + cniArgs = append([]string{ + "PATH=" + os.Getenv("PATH"), + }, cniArgs...) + } return cniPath, cniArgs, nil }