MCPcopy Index your code
hub / github.com/aws/aws-node-termination-handler / MarkWithEventID

Method MarkWithEventID

pkg/node/node.go:227–233  ·  view source on GitHub ↗

MarkWithEventID will add the drain event ID to the node to be properly ignored after a system restart event

(nodeName string, eventID string)

Source from the content-addressed store, hash-verified

225
226// MarkWithEventID will add the drain event ID to the node to be properly ignored after a system restart event
227func (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
236func (n Node) MaybeMarkForExclusionFromLoadBalancers(nodeName string) error {

Callers 4

TestDryRunFunction · 0.80

Calls 1

addLabelMethod · 0.95

Tested by 3

TestDryRunFunction · 0.64