Skip to content

Commit d8b2940

Browse files
authored
Merge pull request #679 from 2rs2ts/condition-change-event-severity
Use Warn severity on K8s Event when Node condition is True
2 parents 5560df8 + 72ad051 commit d8b2940

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/util/helpers.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ import (
2424

2525
// GenerateConditionChangeEvent generates an event for condition change.
2626
func GenerateConditionChangeEvent(t string, status types.ConditionStatus, reason, message string, timestamp time.Time) types.Event {
27+
severity := types.Info
28+
if status == types.True {
29+
severity = types.Warn
30+
}
2731
return types.Event{
28-
Severity: types.Info,
32+
Severity: severity,
2933
Timestamp: timestamp,
3034
Reason: reason,
3135
Message: fmt.Sprintf("Node condition %s is now: %s, reason: %s, message: %q", t, status, reason, message),

0 commit comments

Comments
 (0)