mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Merge pull request #66038 from liggitt/delete-rs-postcondition
Automatic merge from submit-queue (batch tested with PRs 66038, 65992, 66008). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. ensure rs pod cleanup happens related to #65908 /assign juanvallejo ```release-note NONE ```
This commit is contained in:
commit
3d62e71764
@ -494,13 +494,15 @@ run_rs_tests() {
|
||||
kube::log::status "Deleting rs"
|
||||
kubectl delete rs frontend "${kube_flags[@]}"
|
||||
# Post-condition: no pods from frontend replica set
|
||||
kube::test::get_object_assert 'pods -l "tier=frontend"' "{{range.items}}{{$id_field}}:{{end}}" ''
|
||||
kube::test::wait_object_assert 'pods -l "tier=frontend"' "{{range.items}}{{$id_field}}:{{end}}" ''
|
||||
|
||||
### Create and then delete a replica set with cascade=false, make sure it doesn't delete pods.
|
||||
# Pre-condition: no replica set exists
|
||||
kube::test::get_object_assert rs "{{range.items}}{{$id_field}}:{{end}}" ''
|
||||
# Command
|
||||
kubectl create -f hack/testdata/frontend-replicaset.yaml "${kube_flags[@]}"
|
||||
# wait for all 3 pods to be set up
|
||||
kube::test::wait_object_assert 'pods -l "tier=frontend"' "{{range.items}}{{$pod_container_name_field}}:{{end}}" 'php-redis:php-redis:php-redis:'
|
||||
kube::log::status "Deleting rs"
|
||||
kubectl delete rs frontend "${kube_flags[@]}" --cascade=false
|
||||
# Wait for the rs to be deleted.
|
||||
|
Loading…
Reference in New Issue
Block a user