Retry Update in DeploymentReaper.Stop
This commit is contained in:
		@@ -401,12 +401,9 @@ func (reaper *DeploymentReaper) Stop(namespace, name string, timeout time.Durati
 | 
				
			|||||||
	// paused, move pausing to above update operation. Without it, we need to
 | 
						// paused, move pausing to above update operation. Without it, we need to
 | 
				
			||||||
	// pause deployment before stopping RSs, to prevent creating new RSs.
 | 
						// pause deployment before stopping RSs, to prevent creating new RSs.
 | 
				
			||||||
	// See https://github.com/kubernetes/kubernetes/issues/20966
 | 
						// See https://github.com/kubernetes/kubernetes/issues/20966
 | 
				
			||||||
	deployment, err = deployments.Get(name)
 | 
						deployment, err = reaper.updateDeploymentWithRetries(namespace, name, func(d *extensions.Deployment) {
 | 
				
			||||||
	if err != nil {
 | 
							d.Spec.Paused = true
 | 
				
			||||||
		return err
 | 
						})
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	deployment.Spec.Paused = true
 | 
					 | 
				
			||||||
	deployment, err = deployments.Update(deployment)
 | 
					 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user