Commit 90a45b2d authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #49547 from k82cn/k8s_42001_0

Automatic merge from submit-queue (batch tested with PRs 50119, 48366, 47181, 41611, 49547) Task 0: Added node taints labels and feature flags **What this PR does / why we need it**: Added node taint const for node condition. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: part of #42001 **Release note**: ```release-note None ```
parents 34e9c6fa ec4aa192
...@@ -126,6 +126,13 @@ const ( ...@@ -126,6 +126,13 @@ const (
// //
// Enable equivalence class cache for scheduler. // Enable equivalence class cache for scheduler.
EnableEquivalenceClassCache utilfeature.Feature = "EnableEquivalenceClassCache" EnableEquivalenceClassCache utilfeature.Feature = "EnableEquivalenceClassCache"
// owner: @k82cn
// alpha: v1.8
//
// Taint nodes based on their condition status for 'NetworkUnavailable',
// 'MemoryPressure', 'OutOfDisk' and 'DiskPressure'.
TaintNodesByCondition utilfeature.Feature = "TaintNodesByCondition"
) )
func init() { func init() {
...@@ -156,4 +163,5 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS ...@@ -156,4 +163,5 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
// unintentionally on either side: // unintentionally on either side:
StreamingProxyRedirects: {Default: true, PreRelease: utilfeature.Beta}, StreamingProxyRedirects: {Default: true, PreRelease: utilfeature.Beta},
genericfeatures.AdvancedAuditing: {Default: false, PreRelease: utilfeature.Alpha}, genericfeatures.AdvancedAuditing: {Default: false, PreRelease: utilfeature.Alpha},
TaintNodesByCondition: {Default: false, PreRelease: utilfeature.Alpha},
} }
...@@ -28,6 +28,26 @@ const ( ...@@ -28,6 +28,26 @@ const (
// and removed when node becomes reachable (NodeReady status ConditionTrue). // and removed when node becomes reachable (NodeReady status ConditionTrue).
TaintNodeUnreachable = "node.alpha.kubernetes.io/unreachable" TaintNodeUnreachable = "node.alpha.kubernetes.io/unreachable"
// When feature-gate for TaintBasedEvictions=true flag is enabled,
// TaintNodeOutOfDisk would be automatically added by node controller
// when node becomes out of disk, and removed when node has enough disk.
TaintNodeOutOfDisk = "node.kubernetes.io/outOfDisk"
// When feature-gate for TaintBasedEvictions=true flag is enabled,
// TaintNodeMemoryPressure would be automatically added by node controller
// when node has memory pressure, and removed when node has enough memory.
TaintNodeMemoryPressure = "node.kubernetes.io/memoryPressure"
// When feature-gate for TaintBasedEvictions=true flag is enabled,
// TaintNodeDiskPressure would be automatically added by node controller
// when node has disk pressure, and removed when node has enough disk.
TaintNodeDiskPressure = "node.kubernetes.io/diskPressure"
// When feature-gate for TaintBasedEvictions=true flag is enabled,
// TaintNodeNetworkUnavailable would be automatically added by node controller
// when node's network is unavailable, and removed when network becomes ready.
TaintNodeNetworkUnavailable = "node.kubernetes.io/networkUnavailable"
// When kubelet is started with the "external" cloud provider, then // When kubelet is started with the "external" cloud provider, then
// it sets this taint on a node to mark it as unusable, until a controller // it sets this taint on a node to mark it as unusable, until a controller
// from the cloud-controller-manager intitializes this node, and then removes // from the cloud-controller-manager intitializes this node, and then removes
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment