-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
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:
kubernetes/pkg/kubelet/pleg/generic.go
Lines 314 to 327 in d36322f
| 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:
kubernetes/pkg/kubelet/pleg/evented.go
Lines 430 to 432 in d36322f
| 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:
kubernetes/pkg/kubelet/kubelet.go
Line 197 in d36322f
| 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
Type
Projects
Status