diff options
Diffstat (limited to 'vendor')
4 files changed, 27 insertions, 6 deletions
diff --git a/vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go b/vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go index c2ba9e4f2..e49c1dc84 100644 --- a/vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go +++ b/vendor/github.com/cri-o/ocicni/pkg/ocicni/ocicni.go @@ -142,6 +142,9 @@ func (plugin *cniNetworkPlugin) monitorNetDir() { logrus.Errorf("CNI setting failed, continue monitoring: %v", err) case err := <-watcher.Errors: + if err == nil { + continue + } logrus.Errorf("CNI monitoring error %v", err) close(plugin.monitorNetDirChan) return diff --git a/vendor/github.com/cri-o/ocicni/pkg/ocicni/types.go b/vendor/github.com/cri-o/ocicni/pkg/ocicni/types.go index 60816d179..39e9b591c 100644 --- a/vendor/github.com/cri-o/ocicni/pkg/ocicni/types.go +++ b/vendor/github.com/cri-o/ocicni/pkg/ocicni/types.go @@ -9,12 +9,6 @@ const ( DefaultInterfaceName = "eth0" // CNIPluginName is the default name of the plugin CNIPluginName = "cni" - // DefaultNetDir is the place to look for CNI Network - DefaultNetDir = "/etc/cni/net.d" - // DefaultCNIDir is the place to look for cni config files - DefaultCNIDir = "/opt/cni/bin" - // VendorCNIDirTemplate is the template for looking up vendor specific cni config/executable files - VendorCNIDirTemplate = "%s/opt/%s/bin" ) // PortMapping maps to the standard CNI portmapping Capability diff --git a/vendor/github.com/cri-o/ocicni/pkg/ocicni/types_unix.go b/vendor/github.com/cri-o/ocicni/pkg/ocicni/types_unix.go new file mode 100644 index 000000000..21e713ffc --- /dev/null +++ b/vendor/github.com/cri-o/ocicni/pkg/ocicni/types_unix.go @@ -0,0 +1,12 @@ +// +build !windows + +package ocicni + +const ( + // DefaultNetDir is the place to look for CNI Network + DefaultNetDir = "/etc/cni/net.d" + // DefaultCNIDir is the place to look for cni config files + DefaultCNIDir = "/opt/cni/bin" + // VendorCNIDirTemplate is the template for looking up vendor specific cni config/executable files + VendorCNIDirTemplate = "%s/opt/%s/bin" +) diff --git a/vendor/github.com/cri-o/ocicni/pkg/ocicni/types_windows.go b/vendor/github.com/cri-o/ocicni/pkg/ocicni/types_windows.go new file mode 100644 index 000000000..f8b434c12 --- /dev/null +++ b/vendor/github.com/cri-o/ocicni/pkg/ocicni/types_windows.go @@ -0,0 +1,12 @@ +// +build windows + +package ocicni + +const ( + // DefaultNetDir is the place to look for CNI Network + DefaultNetDir = "C:\\cni\\etc\\net.d" + // DefaultCNIDir is the place to look for cni config files + DefaultCNIDir = "C:\\cni\\bin" + // VendorCNIDirTemplate is the template for looking up vendor specific cni config/executable files + VendorCNIDirTemplate = "C:\\cni\\%s\\opt\\%s\\bin" // XXX(vbatts) Not sure what to do here ... +) |