@@ -30,14 +30,22 @@ func (versionedMsgsV1) ProblemMonitoringForEvents(monitorKind string, err error)
3030 log .Warn ().Str ("event_type" , monitorKind ).Err (err ).Msg ("There was a problem monitoring for events" )
3131}
3232
33- func (versionedMsgsV1 ) RequestingInstanceDrain (event * monitor.InterruptionEvent ) {
33+ func (versionedMsgsV1 ) ProcessingInterruptionEvent (event * monitor.InterruptionEvent ) {
34+ var message string
35+ switch event .Kind {
36+ case monitor .ASGLaunchLifecycleKind :
37+ message = "Processing launch lifecycle event"
38+ default :
39+ message = "Requesting instance drain"
40+ }
41+
3442 log .Info ().
3543 Str ("event-id" , event .EventID ).
3644 Str ("kind" , event .Kind ).
3745 Str ("node-name" , event .NodeName ).
3846 Str ("instance-id" , event .InstanceID ).
3947 Str ("provider-id" , event .ProviderID ).
40- Msg ("Requesting instance drain" )
48+ Msg (message )
4149}
4250
4351func (versionedMsgsV1 ) SendingInterruptionEventToChannel (_ string ) {
@@ -54,15 +62,23 @@ func (versionedMsgsV2) ProblemMonitoringForEvents(monitorKind string, err error)
5462 log .Warn ().Str ("monitor_type" , monitorKind ).Err (err ).Msg ("There was a problem monitoring for events" )
5563}
5664
57- func (versionedMsgsV2 ) RequestingInstanceDrain (event * monitor.InterruptionEvent ) {
65+ func (versionedMsgsV2 ) ProcessingInterruptionEvent (event * monitor.InterruptionEvent ) {
66+ var message string
67+ switch event .Kind {
68+ case monitor .ASGLaunchLifecycleKind :
69+ message = "Processing launch lifecycle event"
70+ default :
71+ message = "Requesting instance drain"
72+ }
73+
5874 log .Info ().
5975 Str ("event-id" , event .EventID ).
6076 Str ("kind" , event .Kind ).
6177 Str ("monitor" , event .Monitor ).
6278 Str ("node-name" , event .NodeName ).
6379 Str ("instance-id" , event .InstanceID ).
6480 Str ("provider-id" , event .ProviderID ).
65- Msg ("Requesting instance drain" )
81+ Msg (message )
6682}
6783
6884func (versionedMsgsV2 ) SendingInterruptionEventToChannel (eventKind string ) {
@@ -72,7 +88,7 @@ func (versionedMsgsV2) SendingInterruptionEventToChannel(eventKind string) {
7288var VersionedMsgs interface {
7389 MonitoringStarted (monitorKind string )
7490 ProblemMonitoringForEvents (monitorKind string , err error )
75- RequestingInstanceDrain (event * monitor.InterruptionEvent )
91+ ProcessingInterruptionEvent (event * monitor.InterruptionEvent )
7692 SendingInterruptionEventToChannel (eventKind string )
7793} = versionedMsgsV1 {}
7894
0 commit comments