File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -317,7 +317,10 @@ func (g *GenericPLEG) Relist() {
317
317
completedConditions = append (completedConditions , condition )
318
318
}
319
319
}
320
- g .completeWatchConditions (pid , completedConditions )
320
+ if len (completedConditions ) > 0 {
321
+ g .completeWatchConditions (pid , completedConditions )
322
+ events = append (events , & PodLifecycleEvent {ID : pid , Type : ConditionMet })
323
+ }
321
324
322
325
// Update the internal storage and send out the events.
323
326
g .podRecords .update (pid )
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ const (
47
47
PodSync PodLifeCycleEventType = "PodSync"
48
48
// ContainerChanged - event type when the new state of container is unknown.
49
49
ContainerChanged PodLifeCycleEventType = "ContainerChanged"
50
+ // ConditionMet - event type triggered when any number of watch conditions are met.
51
+ ConditionMet PodLifeCycleEventType = "ConditionMet"
50
52
)
51
53
52
54
// PodLifecycleEvent is an event that reflects the change of the pod state.
You can’t perform that action at this time.
0 commit comments