Skip to content

Commit

Permalink
Merge pull request #679 from 2rs2ts/condition-change-event-severity
Browse files Browse the repository at this point in the history
Use Warn severity on K8s Event when Node condition is True
  • Loading branch information
k8s-ci-robot authored Aug 1, 2022
2 parents 5560df8 + 72ad051 commit d8b2940
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/util/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ import (

// GenerateConditionChangeEvent generates an event for condition change.
func GenerateConditionChangeEvent(t string, status types.ConditionStatus, reason, message string, timestamp time.Time) types.Event {
severity := types.Info
if status == types.True {
severity = types.Warn
}
return types.Event{
Severity: types.Info,
Severity: severity,
Timestamp: timestamp,
Reason: reason,
Message: fmt.Sprintf("Node condition %s is now: %s, reason: %s, message: %q", t, status, reason, message),
Expand Down

0 comments on commit d8b2940

Please sign in to comment.