mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-21 13:49:13 +00:00
Merge pull request #126287 from devppratik/121793-update-node-monitor-grace-period
node: Update Node Monitor Grace Period default duration to 50s
This commit is contained in:
@@ -32,7 +32,8 @@ type NodeLifecycleControllerConfiguration struct {
|
||||
// NodeMonitorGracePeriod is the amount of time which we allow a running node to be
|
||||
// unresponsive before marking it unhealthy. Must be N times more than kubelet's
|
||||
// nodeStatusUpdateFrequency, where N means number of retries allowed for kubelet
|
||||
// to post node status.
|
||||
// to post node status. This value should also be greater than the sum of
|
||||
// HTTP2_PING_TIMEOUT_SECONDS and HTTP2_READ_IDLE_TIMEOUT_SECONDS.
|
||||
NodeMonitorGracePeriod metav1.Duration
|
||||
// secondaryNodeEvictionRate is implicitly overridden to 0 for clusters smaller than or equal to largeClusterSizeThreshold
|
||||
LargeClusterSizeThreshold int32
|
||||
|
||||
@@ -37,8 +37,13 @@ func RecommendedDefaultNodeLifecycleControllerConfiguration(obj *kubectrlmgrconf
|
||||
if obj.PodEvictionTimeout == zero {
|
||||
obj.PodEvictionTimeout = metav1.Duration{Duration: 5 * time.Minute}
|
||||
}
|
||||
// NodeMonitorGracePeriod is set to a default value of 50 seconds.
|
||||
// This value should be greater than the sum of HTTP2_PING_TIMEOUT_SECONDS (30s)
|
||||
// and HTTP2_READ_IDLE_TIMEOUT_SECONDS (15s) from the http2 health check
|
||||
// to ensure that the server has adequate time to handle slow or idle connections
|
||||
// properly before marking a node as unhealthy.
|
||||
if obj.NodeMonitorGracePeriod == zero {
|
||||
obj.NodeMonitorGracePeriod = metav1.Duration{Duration: 40 * time.Second}
|
||||
obj.NodeMonitorGracePeriod = metav1.Duration{Duration: 50 * time.Second}
|
||||
}
|
||||
if obj.NodeStartupGracePeriod == zero {
|
||||
obj.NodeStartupGracePeriod = metav1.Duration{Duration: 60 * time.Second}
|
||||
|
||||
@@ -284,7 +284,11 @@ type Controller struct {
|
||||
// be less than the node health signal update frequency, since there will
|
||||
// only be fresh values from Kubelet at an interval of node health signal
|
||||
// update frequency.
|
||||
// 2. nodeMonitorGracePeriod can't be too large for user experience - larger
|
||||
// 2. nodeMonitorGracePeriod should be greater than the sum of HTTP2_PING_TIMEOUT_SECONDS (30s)
|
||||
// and HTTP2_READ_IDLE_TIMEOUT_SECONDS (15s) from the http2 health check
|
||||
// to ensure that the server has adequate time to handle slow or idle connections
|
||||
// properly before marking a node as unhealthy.
|
||||
// 3. nodeMonitorGracePeriod can't be too large for user experience - larger
|
||||
// value takes longer for user to see up-to-date node health.
|
||||
nodeMonitorGracePeriod time.Duration
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
testNodeMonitorGracePeriod = 40 * time.Second
|
||||
testNodeMonitorGracePeriod = 50 * time.Second
|
||||
testNodeStartupGracePeriod = 60 * time.Second
|
||||
testNodeMonitorPeriod = 5 * time.Second
|
||||
testRateLimiterQPS = float32(100000)
|
||||
|
||||
Reference in New Issue
Block a user