mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue (batch tested with PRs 65776, 64896). 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>. kubectl: wait for all errors and successes on podEviction **What this PR does / why we need it**: This fixes `kubectl drain` to wait until all errors and successes are processed, instead of returning the first error. It also tweaks the behavior of the cleanup to check to see if the pod is already terminating, and if it is to not reissue the pod terminate which leads to an error getting thrown. This fix will allow `kubectl drain` to complete successfully when a node is draining. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: /cc @sjenning **Release note**: ```release-note NONE ``` #### Reproduction steps ### sleep.yml ```yaml apiVersion: v1 kind: Pod metadata: name: bash spec: containers: - name: bash image: bash resources: limits: cpu: 500m memory: 500Mi command: - bash - -c - "nothing() { sleep 1; } ; trap nothing 15 ; while true; do echo \"hello\"; sleep 10; done" terminationGracePeriodSeconds: 3000 restartPolicy: Never ``` ``` $ kubectl create ns testing $ kubectl create -f sleep.yml $ kubectl delete ns testing $ kubectl drain 127.0.0.1 --force ``` |
||
---|---|---|
.. | ||
api | ||
apis | ||
auth | ||
capabilities | ||
client | ||
cloudprovider | ||
controller | ||
credentialprovider | ||
features | ||
fieldpath | ||
generated | ||
kubeapiserver | ||
kubectl | ||
kubelet | ||
kubemark | ||
master | ||
printers | ||
probe | ||
proxy | ||
quota | ||
registry | ||
routes | ||
scheduler | ||
security | ||
securitycontext | ||
serviceaccount | ||
ssh | ||
util | ||
version | ||
volume | ||
watch/json | ||
windows/service | ||
.import-restrictions | ||
BUILD | ||
OWNERS |