Add --force to kubectl delete and explain force deletion

--force is required for --grace-period=0. --now is == --grace-period=1.
Improve command help to explain what graceful deletion is and warn about
force deletion.
This commit is contained in:
Clayton Coleman
2016-10-24 22:43:37 -04:00
parent d28f7031a1
commit 6e25830378
4 changed files with 55 additions and 20 deletions

View File

@@ -23,7 +23,7 @@ readonly red=$(tput setaf 1)
readonly green=$(tput setaf 2)
kube::test::clear_all() {
kubectl delete "${kube_flags[@]}" rc,pods --all --grace-period=0
kubectl delete "${kube_flags[@]}" rc,pods --all --grace-period=0 --force
}
# Force exact match of a returned result for a object query. Wrap this with || to support multiple