Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Kubemark testing identified an expensive method in the shim, which is called for every node update.
func hasReadyCondition(node *v1.Node) bool { if node != nil && node.Status.String() != "nil" { for _, condition := range node.Status.Conditions { if condition.Type == v1.NodeReady && condition.Status == v1.ConditionTrue { return true } } } return false }
node.Status cannot be nil, and Status.String() builds a decently sized string. The check against "nil" should be deleted.
Attachments
Attachments
Issue Links
- links to