Merge pull request #679 from 2rs2ts/condition-change-event-severity

Use Warn severity on K8s Event when Node condition is True
This commit is contained in:
Kubernetes Prow Robot
2022-08-01 16:22:28 -07:00
committed by GitHub
+5 -1
View File
@@ -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),