The TestControllerSyncPool/remove-pool flaked because it intentionally runs
with no sync delay, in which case the delete event may add the pool again to
the ready queue directly. This raced with checking the queue state where "no
pools in ready queue" was expected.
The solution is to relax checking in this particular case and exclude the ready
queue.
This fix makes doPodResizeAction() return the result instead of setting
an error to the `result` argument, which should have been passed as a
pointer, so that the error is propagated to the caller. This fix also
makes the usage of PodSyncResult more consistent with other operations
like starting and killing a container.
Adding new function to evaluate uncore cache id. Reverse allocation logic.
Implement preferAlignByUncorecache within TakeByTopologyNUMAPacked, along with new test cases.
All logic related to obtaining DRA objects and tracking modifications
to ResourceClaims in-memory is extracted to DefaultDRAManager, which
implements framework.SharedDRAManager.
This is intended to be a no-op in terms of the DRA plugin behavior.
Using securejoin.SecureJoin() ensures that paths are bound within a
given root, but it doesn't protect from changes happening between the
construction of the path and its use. securejoin 0.3 introduces a new
Linux-specific API which avoids this by making rooted open operations
explicit; this migrates kubelet's log retrieval to use that.
Signed-off-by: Stephen Kitt <skitt@redhat.com>
SharedDRAManager will be used by the DRA plugin to obtain DRA
objects, and to track modifications to them in-memory. The current
DRA plugin behavior will be the default implementation of
SharedDRAManager.
Plugging a different implementation will allow Cluster Autoscaler
to provide a simulated state of DRA objects to the DRA plugin when
making scheduling simulations, as well as obtain the modifications
to DRA objects from the plugin.
Mirror pods for static pods may not be created immediately during node startup
because either the node is not registered or node informer is not synced.
They will be created eventually when static pods are resynced (every 1-1.5 minutes).
However, during this delay of 1-1.5 mins, kube-scheduler might overcommit resources
to the node and eventually cause kubelet to reject pods with
OutOfCPU/OutOfMemory/OutOfPods error.
To ensure kube-scheduler is aware of static pod resource usage faster,
mirror pods are created as soon as the node registers.
A better place is the cel package because a) the name can become shorter
and b) it is tightly coupled with the compiler there.
Moving the compilation into the cache simplifies the callers.
* Refactor various hardcoded backoffs into separate constants
Signed-off-by: Laura Lorenz <lauralorenz@google.com>
* Fix comment formatting
Signed-off-by: Laura Lorenz <lauralorenz@google.com>
---------
Signed-off-by: Laura Lorenz <lauralorenz@google.com>
This expands the generic plugin support to both validating and mutating policies. It also adds the
mutating policy admission plugin using the generics plugin support.
This also implements both ApplyConfiguration and JSONPatch support.
Co-authored-by: Alexander Zielensk <alexzielenski@gmail.com>