kubectl: Check for Deployment overlap annotation in reaper.

This effectively reverts the client-side changes in
cec3899b96.
We have to maintain the old behavior on the client side to support
version skew when talking to old servers that set the annotation.

However, the new server-side behavior is still to NOT set the
annotation.
This commit is contained in:
Anthony Yeh
2017-03-16 10:08:22 -07:00
parent b2525d43ed
commit 725ec0cc5e
3 changed files with 16 additions and 0 deletions

View File

@@ -67,6 +67,10 @@ const (
RollbackTemplateUnchanged = "DeploymentRollbackTemplateUnchanged"
// RollbackDone is the done rollback event reason
RollbackDone = "DeploymentRollback"
// OverlapAnnotation marks deployments with overlapping selector with other deployments
// TODO: Delete this annotation when we no longer need to support a client
// talking to a server older than v1.6.
OverlapAnnotation = "deployment.kubernetes.io/error-selector-overlapping-with"
// Reasons for deployment conditions
//
@@ -287,6 +291,7 @@ var annotationsToSkip = map[string]bool{
RevisionHistoryAnnotation: true,
DesiredReplicasAnnotation: true,
MaxReplicasAnnotation: true,
OverlapAnnotation: true,
}
// skipCopyAnnotation returns true if we should skip copying the annotation with the given annotation key