Taint node when it under PID pressure.

Signed-off-by: Da K. Ma <madaxa@cn.ibm.com>
This commit is contained in:
Da K. Ma 2018-02-17 10:55:29 +08:00
parent 3a60b0b4f2
commit 6bda1bec6e
2 changed files with 7 additions and 0 deletions

View File

@ -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 (
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,
} }
) )

View File

@ -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