Merge pull request #77423 from apelisse/rollout-restart-other-workloads

Implement rollout restart for statefulset and daemonset
This commit is contained in:
Kubernetes Prow Robot
2019-05-16 16:27:06 -07:00
committed by GitHub
3 changed files with 56 additions and 3 deletions

View File

@@ -43,6 +43,10 @@ run_daemonset_tests() {
kubectl set resources daemonsets/bind "${kube_flags[@]:?}" --limits=cpu=200m,memory=512Mi
kube::test::get_object_assert 'daemonsets bind' "{{${template_generation_field:?}}}" '4'
# Rollout restart should change generation
kubectl rollout restart daemonset/bind "${kube_flags[@]}"
kube::test::get_object_assert 'daemonsets bind' "{{${template_generation_field}}}" '5'
# Clean up
kubectl delete -f hack/testdata/rollingupdate-daemonset.yaml "${kube_flags[@]:?}"
@@ -488,6 +492,10 @@ run_stateful_set_tests() {
# TODO: test robust scaling in an e2e.
wait-for-pods-with-label "app=nginx-statefulset" "nginx-0"
# Rollout restart should change generation
kubectl rollout restart statefulset nginx "${kube_flags[@]}"
kube::test::get_object_assert 'statefulset nginx' "{{$statefulset_observed_generation}}" '3'
### Clean up
kubectl delete -f hack/testdata/rollingupdate-statefulset.yaml "${kube_flags[@]:?}"
# Post-condition: no pods from statefulset controller