Skip to content

Commit

Permalink
cni handler: do not wait routed annotation for net1 (#1586)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Jun 7, 2022
1 parent f5c3ed3 commit b6796d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/daemon/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (csh cniServerHandler) handleAdd(req *restful.Request, resp *restful.Respon
nicType = pod.Annotations[util.PodNicAnnotation]
}

if pod.Annotations[fmt.Sprintf(util.RoutedAnnotationTemplate, podRequest.Provider)] != "true" {
if ifName == "eth0" && pod.Annotations[fmt.Sprintf(util.RoutedAnnotationTemplate, podRequest.Provider)] != "true" {
klog.Infof("wait route ready for pod %s/%s provider %s", podRequest.PodNamespace, podRequest.PodName, podRequest.Provider)
cniWaitRouteResult.WithLabelValues(nodeName).Inc()
time.Sleep(1 * time.Second)
Expand Down

0 comments on commit b6796d0

Please sign in to comment.