mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Do not handle AlreadyExists errors yet
This commit is contained in:
parent
a551dff534
commit
8cd4459b6c
@ -301,6 +301,7 @@ func (dc *DeploymentController) handleErr(err error, key interface{}) {
|
||||
}
|
||||
|
||||
utilruntime.HandleError(err)
|
||||
glog.V(2).Infof("Dropping deployment %q out of the queue: %v", key, err)
|
||||
dc.queue.Forget(key)
|
||||
}
|
||||
|
||||
|
@ -357,8 +357,10 @@ func (dc *DeploymentController) getNewReplicaSet(deployment *extensions.Deployme
|
||||
createdRS, err := dc.client.Extensions().ReplicaSets(namespace).Create(&newRS)
|
||||
switch {
|
||||
// We may end up hitting this due to a slow cache or a fast resync of the deployment.
|
||||
case errors.IsAlreadyExists(err):
|
||||
return dc.rsLister.ReplicaSets(namespace).Get(newRS.Name)
|
||||
// TODO: Restore once https://github.com/kubernetes/kubernetes/issues/29735 is fixed
|
||||
// ie. we start using a new hashing algorithm.
|
||||
// case errors.IsAlreadyExists(err):
|
||||
// return dc.rsLister.ReplicaSets(namespace).Get(newRS.Name)
|
||||
case err != nil:
|
||||
msg := fmt.Sprintf("Failed to create new replica set %q: %v", newRS.Name, err)
|
||||
if deployment.Spec.ProgressDeadlineSeconds != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user