From c1880f37149547931832c0e77d5d853b164f150e Mon Sep 17 00:00:00 2001 From: Hemanth Nakkina Date: Thu, 27 Jun 2019 09:40:46 +0000 Subject: [PATCH] K8S_ANNOT not recognized by multus cni plugin K8S_ANNOT option is only supported by CNI Genie but not by other CNI plugins like Multus. IgnoreUnknown option is not added to CNI call when pod id, name is missing because of which multus raise an unknwon option error. This patch adds IgnoreUnknown option even when pod id and name are missing. --- pkg/cni/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cni/client.go b/pkg/cni/client.go index 1500377fe..5f81bada3 100644 --- a/pkg/cni/client.go +++ b/pkg/cni/client.go @@ -143,6 +143,10 @@ func (c *realClient) cniRuntimeConf(podID, podName, podNs string) *libcni.Runtim {"K8S_POD_NAME", podName}, {"K8S_POD_INFRA_CONTAINER_ID", podID}, } + } else { + r.Args = [][2]string{ + {"IgnoreUnknown", "1"}, + } } return r }