From 9e3fe771709e2ea9870c8b9bff6a563537147863 Mon Sep 17 00:00:00 2001 From: Heeyoung Jung Date: Wed, 22 Jan 2025 14:49:37 -0800 Subject: [PATCH] Add inline comment for heartbeatUntil default behavior --- pkg/monitor/sqsevent/asg-lifecycle-event.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/monitor/sqsevent/asg-lifecycle-event.go b/pkg/monitor/sqsevent/asg-lifecycle-event.go index d318f7e6..a442b824 100644 --- a/pkg/monitor/sqsevent/asg-lifecycle-event.go +++ b/pkg/monitor/sqsevent/asg-lifecycle-event.go @@ -114,6 +114,7 @@ func (m SQSMonitor) asgTerminationToInterruptionEvent(event *EventBridgeEvent, m interruptionEvent.PreDrainTask = func(interruptionEvent monitor.InterruptionEvent, n node.Node) error { nthConfig := n.GetNthConfig() + // If only HeartbeatInterval is set, HeartbeatUntil will default to 172800. if nthConfig.HeartbeatInterval != -1 && nthConfig.HeartbeatUntil != -1 { go m.checkHeartbeatTimeout(nthConfig.HeartbeatInterval, lifecycleDetail) go m.SendHeartbeats(nthConfig.HeartbeatInterval, nthConfig.HeartbeatUntil, lifecycleDetail, stopHeartbeatCh)