controller: save older revisions for Deployment's replica sets

This commit is contained in:
Michail Kargakis
2016-10-06 17:02:51 +02:00
parent db1985716f
commit 89eaa918be
3 changed files with 80 additions and 45 deletions

View File

@@ -2134,6 +2134,8 @@ __EOF__
kubectl-with-retry rollout resume deployment nginx "${kube_flags[@]}"
# The resumed deployment can now be rolled back
kubectl rollout undo deployment nginx "${kube_flags[@]}"
# Check that the new replica set (nginx-618515232) has all old revisions stored in an annotation
kubectl get rs nginx-618515232 -o yaml | grep "deployment.kubernetes.io/revision-history: 1,3"
# Clean up
kubectl delete deployment nginx "${kube_flags[@]}"