mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-08-28 12:51:01 +00:00
pass through the pod annotations when multus receives them
See https://github.com/kubernetes/kubernetes/issues/69882\#issuecomment-1509077177 Passing the annotations seems not to be a standardized behaviour, but it is very useful nontheless. Signed-off-by: Philipp Riederer <priederer@genesiscloud.com>
This commit is contained in:
parent
003fbd5785
commit
7ad9d7a04a
@ -268,6 +268,9 @@ func newCNIRuntimeConf(containerID, sandboxID, podName, podNamespace, podUID, ne
|
||||
if delegateRc.CNIDeviceInfoFile != "" {
|
||||
capabilityArgs["CNIDeviceInfoFile"] = delegateRc.CNIDeviceInfoFile
|
||||
}
|
||||
if delegateRc.PodAnnotations != nil {
|
||||
capabilityArgs["io.kubernetes.cri.pod-annotations"] = delegateRc.PodAnnotations
|
||||
}
|
||||
rt.CapabilityArgs = capabilityArgs
|
||||
}
|
||||
return rt, cniDeviceInfoFile
|
||||
|
@ -76,6 +76,7 @@ type RuntimeConfig struct {
|
||||
InfinibandGUID string `json:"infinibandGUID,omitempty"`
|
||||
DeviceID string `json:"deviceID,omitempty"`
|
||||
CNIDeviceInfoFile string `json:"CNIDeviceInfoFile,omitempty"`
|
||||
PodAnnotations *map[string]string `json:"io.kubernetes.cri.pod-annotations,omitempty"`
|
||||
}
|
||||
|
||||
// PortMapEntry for CNI PortMapEntry
|
||||
|
Loading…
Reference in New Issue
Block a user