set AllocatedResourcesStatus in the Pod Status
This commit is contained in:
@@ -2473,6 +2473,23 @@ func (kl *Kubelet) syncLoopIteration(ctx context.Context, configCh <-chan kubety
|
||||
status = "started"
|
||||
}
|
||||
handleProbeSync(kl, update, handler, "startup", status)
|
||||
case update := <-kl.containerManager.Updates():
|
||||
pods := []*v1.Pod{}
|
||||
for _, p := range update.PodUIDs {
|
||||
if pod, ok := kl.podManager.GetPodByUID(types.UID(p)); ok {
|
||||
klog.V(3).InfoS("SyncLoop (containermanager): event for pod", "pod", klog.KObj(pod), "event", update)
|
||||
pods = append(pods, pod)
|
||||
} else {
|
||||
// If the pod no longer exists, ignore the event.
|
||||
klog.V(4).InfoS("SyncLoop (containermanager): pod does not exist, ignore devices updates", "event", update)
|
||||
}
|
||||
}
|
||||
if len(pods) > 0 {
|
||||
// Updating the pod by syncing it again
|
||||
// We do not apply the optimization by updating the status directly, but can do it later
|
||||
handler.HandlePodSyncs(pods)
|
||||
}
|
||||
|
||||
case <-housekeepingCh:
|
||||
if !kl.sourcesReady.AllReady() {
|
||||
// If the sources aren't ready or volume manager has not yet synced the states,
|
||||
|
||||
Reference in New Issue
Block a user