Merge pull request #34952 from kargakis/update-observedgeneration-for-overlapping-deployments

Automatic merge from submit-queue

Make overlapping deployments deletable

@kubernetes/deployment ptal

Fixes https://github.com/kubernetes/kubernetes/issues/34466 by 1) not adding the overlapping annotation in the working deployment, 2) updates observedGeneration for overlapping deployments, and 3) updates the kubectl deployment reaper to do non-cascading deletion for deployments with the overlapping annotation.
This commit is contained in:
Kubernetes Submit Queue
2016-10-29 14:50:16 -07:00
committed by GitHub
4 changed files with 57 additions and 41 deletions

View File

@@ -1239,11 +1239,11 @@ func testOverlappingDeployment(f *framework.Framework) {
Expect(err).NotTo(HaveOccurred(), "Failed creating the second deployment")
// Wait for overlapping annotation updated to both deployments
By("Waiting for both deployments to have overlapping annotations")
err = framework.WaitForOverlappingAnnotationMatch(c, ns, deploy.Name, deployOverlapping.Name)
Expect(err).NotTo(HaveOccurred(), "Failed to update the first deployment's overlapping annotation")
By("Waiting for the overlapping deployment to have overlapping annotation")
err = framework.WaitForOverlappingAnnotationMatch(c, ns, deployOverlapping.Name, deploy.Name)
Expect(err).NotTo(HaveOccurred(), "Failed to update the second deployment's overlapping annotation")
err = framework.WaitForOverlappingAnnotationMatch(c, ns, deploy.Name, "")
Expect(err).NotTo(HaveOccurred(), "The deployment that holds the oldest selector shouldn't have the overlapping annotation")
// Only the first deployment is synced
By("Checking only the first overlapping deployment is synced")
@@ -1295,11 +1295,11 @@ func testOverlappingDeployment(f *framework.Framework) {
Expect(err).NotTo(HaveOccurred())
// Wait for overlapping annotation updated to both deployments
By("Waiting for both deployments to have overlapping annotations")
err = framework.WaitForOverlappingAnnotationMatch(c, ns, deployOverlapping.Name, deployLater.Name)
Expect(err).NotTo(HaveOccurred(), "Failed to update the second deployment's overlapping annotation")
By("Waiting for the third deployment to have the overlapping annotation")
err = framework.WaitForOverlappingAnnotationMatch(c, ns, deployLater.Name, deployOverlapping.Name)
Expect(err).NotTo(HaveOccurred(), "Failed to update the third deployment's overlapping annotation")
err = framework.WaitForOverlappingAnnotationMatch(c, ns, deployOverlapping.Name, "")
Expect(err).NotTo(HaveOccurred(), "The deployment that holds the oldest selector shouldn't have the overlapping annotation")
// The second deployment shouldn't be synced
By("Checking the second deployment is not synced")