Skip to content

Commit c8ef869

Browse files
committed
Controller: Set CNI args on the delegate request
The CNI args has to be set in the delegate request so the cni-args in the network attachment annotation are considered. Signed-off-by: Lionel Jouin <[email protected]>
1 parent 8e06025 commit c8ef869

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/controller/pod.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func (pnc *PodNetworksController) processNextWorkItem() bool {
243243
PodNetNS: netnsPath,
244244
})
245245
if err != nil {
246-
klog.Errorf("error removing attachments: %v")
246+
klog.Errorf("error removing attachments: %v", err)
247247
return true
248248
}
249249
}
@@ -465,10 +465,11 @@ func rejectInterfaceAddEventFormat(pod *corev1.Pod) string {
465465
}
466466

467467
func interfaceAttributes(networkData nadv1.NetworkSelectionElement) *multusapi.DelegateInterfaceAttributes {
468-
if len(networkData.IPRequest) > 0 || networkData.MacRequest != "" {
468+
if len(networkData.IPRequest) > 0 || networkData.MacRequest != "" || networkData.CNIArgs != nil {
469469
return &multusapi.DelegateInterfaceAttributes{
470470
IPRequest: networkData.IPRequest,
471471
MacRequest: networkData.MacRequest,
472+
CNIArgs: networkData.CNIArgs,
472473
}
473474
}
474475
return nil

0 commit comments

Comments
 (0)