mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Retry updating deployment only on update conflict error
This commit is contained in:
parent
8f8e6205e5
commit
3095437300
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user