Retry updating deployment only on update conflict error

This commit is contained in:
Michal Fojtik 2016-07-19 13:01:06 +02:00
parent 8f8e6205e5
commit 3095437300

View File

@ -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
}