Merge pull request #47579 from wanghaoran1988/fix_43322

Automatic merge from submit-queue (batch tested with PRs 47958, 46261, 46667, 47709, 47579)

Clean up Deployment overlap annotation code

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #43322

**Special notes for your reviewer**:

**Release note**:

```
None
```
This commit is contained in:
Kubernetes Submit Queue
2017-06-23 07:21:36 -07:00
committed by GitHub
5 changed files with 0 additions and 57 deletions

View File

@@ -594,20 +594,6 @@ func (dc *DeploymentController) syncDeployment(key string) error {
return nil
}
// This is the point at which we used to add/remove the overlap annotation.
// Now we always remove it if it exists, because it is obsolete as of 1.6.
// Although the server no longer adds or looks at the annotation,
// it's important to remove it from controllers created before the upgrade,
// so that old clients (e.g. kubectl reaper) know they can no longer assume
// the controller is blocked due to selector overlap and has no dependents.
if _, ok := d.Annotations[util.OverlapAnnotation]; ok {
delete(d.Annotations, util.OverlapAnnotation)
d, err = dc.client.ExtensionsV1beta1().Deployments(d.Namespace).UpdateStatus(d)
if err != nil {
return fmt.Errorf("couldn't remove obsolete overlap annotation from deployment %v: %v", key, err)
}
}
// List ReplicaSets owned by this Deployment, while reconciling ControllerRef
// through adoption/orphaning.
rsList, err := dc.getReplicaSetsForDeployment(d)