Skip to content

Commit d67783c

Browse files
committed
fix: Reverted the removal of the lifecycle hook completion
Signed-off-by: Steve Hipwell <[email protected]>
1 parent 87b8ffe commit d67783c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/monitor/sqsevent/asg-lifecycle-event.go

+5
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ func (m SQSMonitor) asgTerminationToInterruptionEvent(event *EventBridgeEvent, m
9595
}
9696

9797
interruptionEvent.PostDrainTask = func(interruptionEvent monitor.InterruptionEvent, _ node.Node) error {
98+
_, err = m.continueLifecycleAction(lifecycleDetail)
99+
if err != nil {
100+
return fmt.Errorf("continuing ASG termination lifecycle: %w", err)
101+
}
102+
log.Info().Str("lifecycleHookName", lifecycleDetail.LifecycleHookName).Str("instanceID", lifecycleDetail.EC2InstanceID).Msg("Completed ASG Lifecycle Hook")
98103
return m.deleteMessage(message)
99104
}
100105

0 commit comments

Comments
 (0)