Deployment: Remove Overlap and SelectorUpdate annotations.

These are not used anymore since ControllerRef now protects against
fighting between controllers with overlapping selectors.
This commit is contained in:
Anthony Yeh
2017-03-06 11:54:43 -08:00
parent 94b3c216a1
commit cec3899b96
7 changed files with 0 additions and 200 deletions

View File

@@ -19,9 +19,7 @@ package deployment
import (
"fmt"
"reflect"
"time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
@@ -34,7 +32,6 @@ import (
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/apis/extensions/validation"
"k8s.io/kubernetes/pkg/controller/deployment/util"
)
// deploymentStrategy implements behavior for Deployments.
@@ -93,15 +90,6 @@ func (deploymentStrategy) PrepareForUpdate(ctx genericapirequest.Context, obj, o
!reflect.DeepEqual(newDeployment.Annotations, oldDeployment.Annotations) {
newDeployment.Generation = oldDeployment.Generation + 1
}
// Records timestamp on selector updates in annotation
if !reflect.DeepEqual(newDeployment.Spec.Selector, oldDeployment.Spec.Selector) {
if newDeployment.Annotations == nil {
newDeployment.Annotations = make(map[string]string)
}
now := metav1.Now()
newDeployment.Annotations[util.SelectorUpdateAnnotation] = now.Format(time.RFC3339)
}
}
// ValidateUpdate is the default update validation for an end user.