mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Emit a pod event when WatchConditions are completed
This commit is contained in:
parent
da9c2c553b
commit
35bd1e6831
@ -317,7 +317,10 @@ func (g *GenericPLEG) Relist() {
|
||||
completedConditions = append(completedConditions, condition)
|
||||
}
|
||||
}
|
||||
g.completeWatchConditions(pid, completedConditions)
|
||||
if len(completedConditions) > 0 {
|
||||
g.completeWatchConditions(pid, completedConditions)
|
||||
events = append(events, &PodLifecycleEvent{ID: pid, Type: ConditionMet})
|
||||
}
|
||||
|
||||
// Update the internal storage and send out the events.
|
||||
g.podRecords.update(pid)
|
||||
|
@ -47,6 +47,8 @@ const (
|
||||
PodSync PodLifeCycleEventType = "PodSync"
|
||||
// ContainerChanged - event type when the new state of container is unknown.
|
||||
ContainerChanged PodLifeCycleEventType = "ContainerChanged"
|
||||
// ConditionMet - event type triggered when any number of watch conditions are met.
|
||||
ConditionMet PodLifeCycleEventType = "ConditionMet"
|
||||
)
|
||||
|
||||
// PodLifecycleEvent is an event that reflects the change of the pod state.
|
||||
|
Loading…
Reference in New Issue
Block a user