mirror of https://github.com/k3s-io/k3s
Merge pull request #38701 from gmarek/routecontroller
Automatic merge from submit-queue (batch tested with PRs 38736, 38701) Don't retry creating route if it already exists Ref. #38618pull/6/head
commit
3479522de5
|
@ -2400,7 +2400,12 @@ func (gce *GCECloud) CreateRoute(clusterName string, nameHint string, route *clo
|
|||
Description: k8sNodeRouteTag,
|
||||
}).Do()
|
||||
if err != nil {
|
||||
return err
|
||||
if isHTTPErrorCode(err, http.StatusConflict) {
|
||||
glog.Info("Route %v already exists.")
|
||||
return nil
|
||||
} else {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return gce.waitForGlobalOp(insertOp)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue