Skip to content

Commit 3062622

Browse files
committed
More fix to custom plugin monitor condition change
1 parent d793330 commit 3062622

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/custompluginmonitor/custom_plugin_monitor.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,10 @@ func (c *customPluginMonitor) generateStatus(result cpmtypes.Result) *types.Stat
176176

177177
condition.Status = status
178178
condition.Reason = result.Rule.Reason
179-
} else if condition.Status == status && condition.Message != result.Message {
180-
// change 4: Condition status do not change. condition message changes.
179+
} else if condition.Status == status && condition.Reason != result.Rule.Reason {
180+
// change 4: Condition status do not change. condition reason changes.
181181
condition.Transition = timestamp
182+
condition.Reason = result.Rule.Reason
182183
condition.Message = result.Message
183184
events = append(events, util.GenerateConditionChangeEvent(
184185
condition.Type,

0 commit comments

Comments
 (0)