mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 05:30:26 +00:00
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:
@@ -2268,6 +2268,13 @@ __EOF__
|
||||
kubectl get rs nginx-618515232 -o yaml | grep "deployment.kubernetes.io/revision-history: 1,3"
|
||||
# Check that trying to watch the status of a superseded revision returns an error
|
||||
! kubectl rollout status deployment/nginx --revision=3
|
||||
cat hack/testdata/deployment-revision1.yaml | $SED "s/name: nginx$/name: nginx2/" | kubectl create -f - "${kube_flags[@]}"
|
||||
# Newest deployment should be marked as overlapping
|
||||
kubectl get deployment nginx2 -o yaml "${kube_flags[@]}" | grep "deployment.kubernetes.io/error-selector-overlapping-with"
|
||||
# Oldest deployment should not be marked as overlapping
|
||||
! kubectl get deployment nginx -o yaml "${kube_flags[@]}" | grep "deployment.kubernetes.io/error-selector-overlapping-with"
|
||||
# Deletion of both deployments should not be blocked
|
||||
kubectl delete deployment nginx2 "${kube_flags[@]}"
|
||||
# Clean up
|
||||
kubectl delete deployment nginx "${kube_flags[@]}"
|
||||
|
||||
|
Reference in New Issue
Block a user