@@ -32,7 +32,7 @@ func Launching(nodeClaim *v1.NodeClaim, reason string) events.Event {
32
32
return events.Event {
33
33
InvolvedObject : nodeClaim ,
34
34
Type : corev1 .EventTypeNormal ,
35
- Reason : " DisruptionLaunching" ,
35
+ Reason : events . DisruptionLaunching ,
36
36
Message : fmt .Sprintf ("Launching NodeClaim: %s" , cases .Title (language .Und , cases .NoLower ).String (reason )),
37
37
DedupeValues : []string {string (nodeClaim .UID ), reason },
38
38
}
@@ -42,7 +42,7 @@ func WaitingOnReadiness(nodeClaim *v1.NodeClaim) events.Event {
42
42
return events.Event {
43
43
InvolvedObject : nodeClaim ,
44
44
Type : corev1 .EventTypeNormal ,
45
- Reason : " DisruptionWaitingReadiness" ,
45
+ Reason : events . DisruptionWaitingReadiness ,
46
46
Message : "Waiting on readiness to continue disruption" ,
47
47
DedupeValues : []string {string (nodeClaim .UID )},
48
48
}
@@ -53,14 +53,14 @@ func Terminating(node *corev1.Node, nodeClaim *v1.NodeClaim, reason string) []ev
53
53
{
54
54
InvolvedObject : node ,
55
55
Type : corev1 .EventTypeNormal ,
56
- Reason : " DisruptionTerminating" ,
56
+ Reason : events . DisruptionTerminating ,
57
57
Message : fmt .Sprintf ("Disrupting Node: %s" , cases .Title (language .Und , cases .NoLower ).String (reason )),
58
58
DedupeValues : []string {string (node .UID ), reason },
59
59
},
60
60
{
61
61
InvolvedObject : nodeClaim ,
62
62
Type : corev1 .EventTypeNormal ,
63
- Reason : " DisruptionTerminating" ,
63
+ Reason : events . DisruptionTerminating ,
64
64
Message : fmt .Sprintf ("Disrupting NodeClaim: %s" , cases .Title (language .Und , cases .NoLower ).String (reason )),
65
65
DedupeValues : []string {string (nodeClaim .UID ), reason },
66
66
},
@@ -74,15 +74,15 @@ func Unconsolidatable(node *corev1.Node, nodeClaim *v1.NodeClaim, msg string) []
74
74
{
75
75
InvolvedObject : node ,
76
76
Type : corev1 .EventTypeNormal ,
77
- Reason : " Unconsolidatable" ,
77
+ Reason : events . Unconsolidatable ,
78
78
Message : msg ,
79
79
DedupeValues : []string {string (node .UID )},
80
80
DedupeTimeout : time .Minute * 15 ,
81
81
},
82
82
{
83
83
InvolvedObject : nodeClaim ,
84
84
Type : corev1 .EventTypeNormal ,
85
- Reason : " Unconsolidatable" ,
85
+ Reason : events . Unconsolidatable ,
86
86
Message : msg ,
87
87
DedupeValues : []string {string (nodeClaim .UID )},
88
88
DedupeTimeout : time .Minute * 15 ,
@@ -97,7 +97,7 @@ func Blocked(node *corev1.Node, nodeClaim *v1.NodeClaim, msg string) (evs []even
97
97
evs = append (evs , events.Event {
98
98
InvolvedObject : node ,
99
99
Type : corev1 .EventTypeNormal ,
100
- Reason : " DisruptionBlocked" ,
100
+ Reason : events . DisruptionBlocked ,
101
101
Message : msg ,
102
102
DedupeValues : []string {string (node .UID )},
103
103
})
@@ -106,7 +106,7 @@ func Blocked(node *corev1.Node, nodeClaim *v1.NodeClaim, msg string) (evs []even
106
106
evs = append (evs , events.Event {
107
107
InvolvedObject : nodeClaim ,
108
108
Type : corev1 .EventTypeNormal ,
109
- Reason : " DisruptionBlocked" ,
109
+ Reason : events . DisruptionBlocked ,
110
110
Message : msg ,
111
111
DedupeValues : []string {string (nodeClaim .UID )},
112
112
})
@@ -118,7 +118,7 @@ func NodePoolBlockedForDisruptionReason(nodePool *v1.NodePool, reason v1.Disrupt
118
118
return events.Event {
119
119
InvolvedObject : nodePool ,
120
120
Type : corev1 .EventTypeNormal ,
121
- Reason : " DisruptionBlocked" ,
121
+ Reason : events . DisruptionBlocked ,
122
122
Message : fmt .Sprintf ("No allowed disruptions for disruption reason %s due to blocking budget" , reason ),
123
123
DedupeValues : []string {string (nodePool .UID ), string (reason )},
124
124
DedupeTimeout : 1 * time .Minute ,
@@ -129,7 +129,7 @@ func NodePoolBlocked(nodePool *v1.NodePool) events.Event {
129
129
return events.Event {
130
130
InvolvedObject : nodePool ,
131
131
Type : corev1 .EventTypeNormal ,
132
- Reason : " DisruptionBlocked" ,
132
+ Reason : events . DisruptionBlocked ,
133
133
Message : "No allowed disruptions due to blocking budget" ,
134
134
DedupeValues : []string {string (nodePool .UID )},
135
135
// Set a small timeout as a NodePool's disruption budget can change every minute.
0 commit comments