Commit 6bda1bec authored by Da K. Ma's avatar Da K. Ma

Taint node when it under PID pressure.

Signed-off-by: 's avatarDa K. Ma <madaxa@cn.ibm.com>
parent 3a60b0b4
...@@ -89,6 +89,7 @@ var ( ...@@ -89,6 +89,7 @@ var (
v1.NodeOutOfDisk: algorithm.TaintNodeOutOfDisk, v1.NodeOutOfDisk: algorithm.TaintNodeOutOfDisk,
v1.NodeDiskPressure: algorithm.TaintNodeDiskPressure, v1.NodeDiskPressure: algorithm.TaintNodeDiskPressure,
v1.NodeNetworkUnavailable: algorithm.TaintNodeNetworkUnavailable, v1.NodeNetworkUnavailable: algorithm.TaintNodeNetworkUnavailable,
v1.NodePIDPressure: algorithm.TaintNodePIDPressure,
} }
taintKeyToNodeConditionMap = map[string]v1.NodeConditionType{ taintKeyToNodeConditionMap = map[string]v1.NodeConditionType{
...@@ -96,6 +97,7 @@ var ( ...@@ -96,6 +97,7 @@ var (
algorithm.TaintNodeMemoryPressure: v1.NodeMemoryPressure, algorithm.TaintNodeMemoryPressure: v1.NodeMemoryPressure,
algorithm.TaintNodeOutOfDisk: v1.NodeOutOfDisk, algorithm.TaintNodeOutOfDisk: v1.NodeOutOfDisk,
algorithm.TaintNodeDiskPressure: v1.NodeDiskPressure, algorithm.TaintNodeDiskPressure: v1.NodeDiskPressure,
algorithm.TaintNodePIDPressure: v1.NodePIDPressure,
} }
) )
......
...@@ -56,6 +56,11 @@ const ( ...@@ -56,6 +56,11 @@ const (
// and removed when network becomes ready. // and removed when network becomes ready.
TaintNodeNetworkUnavailable = "node.kubernetes.io/network-unavailable" TaintNodeNetworkUnavailable = "node.kubernetes.io/network-unavailable"
// TaintNodePIDPressure will be added when node has pid pressure
// and feature-gate for TaintNodesByCondition flag is enabled,
// and removed when node has enough disk.
TaintNodePIDPressure = "node.kubernetes.io/pid-pressure"
// TaintExternalCloudProvider sets this taint on a node to mark it as unusable, // TaintExternalCloudProvider sets this taint on a node to mark it as unusable,
// when kubelet is started with the "external" cloud provider, until a controller // when kubelet is started with the "external" cloud provider, 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