Skip to content

Commit

Permalink
K8S_ANNOT not recognized by multus cni plugin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hemanthnakkina committed Jun 27, 2019
1 parent 5a0c02c commit c1880f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cni/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c1880f3

Please sign in to comment.