mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-09 03:37:36 +03:00
Enable Graceful Node Shutdown for Kubernetes >= 1.21.0 (#7746)
* Enable Graceful Node Shutdown for Kubernetes >= 1.21.0 * Add sample graceful shutdown parameters
This commit is contained in:
@@ -107,6 +107,13 @@
|
||||
- not ignore_assert_errors
|
||||
- inventory_hostname in groups['kube_node']
|
||||
|
||||
- name: Stop when ShutdownGracePeriod less than ShutdownGracePeriodCriticalPods
|
||||
assert:
|
||||
that: kubelet_shutdown_grace_period > kubelet_shutdown_grace_period_critical_pods
|
||||
msg: "ShutdownGracePeriod ({{ kubelet_shutdown_grace_period }}) needs to be greater than ShutdownGracePeriodCriticalPods ({{ kubelet_shutdown_grace_period_critical_pods }}) in order to give normal pods time to be evacuated, please see https://kubernetes.io/blog/2021/04/21/graceful-node-shutdown-beta/ for details"
|
||||
when:
|
||||
- kube_version is version('v1.21.0', '>=')
|
||||
|
||||
# This assertion will fail on the safe side: One can indeed schedule more pods
|
||||
# on a node than the CIDR-range has space for when additional pods use the host
|
||||
# network namespace. It is impossible to ascertain the number of such pods at
|
||||
|
||||
Reference in New Issue
Block a user