MarkWithEventID will add the drain event ID to the node to be properly ignored after a system restart event
(nodeName string, eventID string)
| 225 | |
| 226 | // MarkWithEventID will add the drain event ID to the node to be properly ignored after a system restart event |
| 227 | func (n Node) MarkWithEventID(nodeName string, eventID string) error { |
| 228 | err := n.addLabel(nodeName, EventIDLabelKey, eventID, false) |
| 229 | if err != nil { |
| 230 | return fmt.Errorf("unable to label node with event ID %s=%s: %w", EventIDLabelKey, eventID, err) |
| 231 | } |
| 232 | return nil |
| 233 | } |
| 234 | |
| 235 | // MaybeMarkForExclusionFromLoadBalancers will activate the ServiceNodeExclusion feature flag to indicate that the node should be removed from load balancers |
| 236 | func (n Node) MaybeMarkForExclusionFromLoadBalancers(nodeName string) error { |