-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
CNI spec should be allowed to pass arbitrary data in CNI result from the container runtime to the OCI runtime. Currently, there is an ability to influence the inputs to the CNI network configuration via runtime configuration. In a similar way, the CNI can add a metadata field to interface to pass down additional data to OCI runtime. The metadata field will be added to the Interface struct as a map[string]string and be optional. We can standardize specific keys similar to our conventions. The NRI plugin system may also benefit from this additional metadata. Our main use case for this is to support virtual runtimes and possibly advanced networking scenarios. This has been requested several times however no one has completed the work.
Current:
type Interface struct {
Name string `json:"name"`
Mac string `json:"mac,omitempty"`
Sandbox string `json:"sandbox,omitempty"`
}
Proposal:
type Interface struct {
Name string `json:"name"`
Mac string `json:"mac,omitempty"`
Sandbox string `json:"sandbox,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
Work Involved:
- Create proposal as a Github Issue in the CNI repo
- Create a PR for the specification updates
- Create a PR for libcni
- Update community plugins
- Update go-cni/ocicni to support latest types
- Update containerd/cri-o to use latest go-cni/ocicni