//// pkg/kubelet/pleg/generic.go - relist()
pods := kubecontainer.Pods(podList)
g.podRecords.setCurrent(pods)
// Compare the old and the current pods, and generate events.
eventsByPodID := map[types.UID][]*PodLifecycleEvent{}
for pid := range g.podRecords {
oldPod := g.podRecords.getOld(pid)
pod := g.podRecords.getCurrent(pid)
// Get all containers in the old and the new pod.
allContainers := getContainersFromPods(oldPod, pod)
for _, container := range allContainers {
events := computeEvents(oldPod, pod, &container.ID)
for _, e := range events {
updateEvents(eventsByPodID, e)
}
}
}
Created
October 19, 2019 07:12
-
-
Save bysnupy/919781cb3f3ab62153e63960b3412038 to your computer and use it in GitHub Desktop.
PLEG is not healthy updateevents source code in relist
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment