Skip to content

Add Container Event Notification for CRI's Update*Resources Interface to Support In-Place Pod Resizing #131112

Open
@HirazawaUi

Description

@HirazawaUi

The current evented PLEG implementation in CRI generates container events (create/start/stop/delete) to trigger syncPod, but it fails to accommodate the in-place pod resizing feature. During in-place pod resizing, after completing container resource updates via UpdateContainerResources/UpdatePodSandboxResources, we need to re-trigger syncPod to update the container status.

In the generic PLEG implementation, this is achieved by forcing a synthetic container event during the next PLEG relist after doPodResizeAction, which triggers syncPod. However, for evented PLEG (where events originate directly from the container runtime via CRI), there is no native event generated when resource updates occur. Currently, In PR #131024, I implemented a temporary workaround by simulating container runtime-generated events to achieve this behavior. While this approach unblocks testing, it remains a short-term fix.

To fully align with evented PLEG's design, we need container runtimes to emit a dedicated "Update" event when their UpdateContainerResources or UpdatePodSandboxResources CRI interfaces are invoked. This event should notify the Kubelet to trigger syncPod, ensuring consistent behavior between generic and evented PLEG implementations.

/sig node
/kind feature

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.priority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to complete.sig/nodeCategorizes an issue or PR as relevant to SIG Node.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions