Skip to content

[EventedPLEG] EventedPLEG should detect resize completion rapidly #129829

@hshiina

Description

@hshiina

What would you like to be added?

EventedPLEG should detect completion of pod resizing in the runtime as rapidly as GenericPLEG.

Since v1.32 (#128518), GenericPLEG polls container resources in the runtime at resizing a pod so that it detects resize completion rapidly. This poll is actuated when GenericPLEG relists pods regularly:

var completedConditions []versionedWatchCondition
for _, condition := range watchConditions {
if condition.condition(status) {
// condition was met: add it to the list of completed conditions.
completedConditions = append(completedConditions, condition)
}
}
if len(completedConditions) > 0 {
g.completeWatchConditions(pid, completedConditions)
// If at least 1 condition completed, emit a ConditionMet event to trigger a pod sync.
// We only emit 1 event even if multiple conditions are met, since SyncPod reevaluates
// all containers in the pod with the latest status.
events = append(events, &PodLifecycleEvent{ID: pid, Type: ConditionMet})
}

EventedPLEG depends on GenericPLEG for this polling:

func (e *EventedPLEG) SetPodWatchCondition(podUID types.UID, conditionKey string, condition WatchCondition) {
e.genericPleg.SetPodWatchCondition(podUID, conditionKey, condition)
}

When EventedPLEG is enabled, GenericPLEG relists pods every five minutes:

eventedPlegRelistPeriod = time.Second * 300

Then, it takes at most five minutes till pod resize appears to be completed in the API.

Why is this needed?

Pod resize should complete as quickly as if EventedPLEG is not enabled.

Considering maturity of features, I don’t think this issue blocks promotion of InPlacePodVerticalScaling. This issue should be solved for promoting EventedPLEG.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.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

Triaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions