mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 21:21:14 +00:00
Retry updating deployment only on update conflict error
This commit is contained in:
@@ -424,7 +424,11 @@ func (reaper *DeploymentReaper) updateDeploymentWithRetries(namespace, name stri
|
||||
if deployment, err = deployments.Update(deployment); err == nil {
|
||||
return true, nil
|
||||
}
|
||||
return false, nil
|
||||
// Retry only on update conflict.
|
||||
if errors.IsConflict(err) {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
})
|
||||
return deployment, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user