-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug: StatefulSets are not reevaluated after rescheduling (#67)
* bug: StatefulSets are not reevaluated after rescheduling # Context Noe caches the Pods it has already processed to avoid reprocessing them unless there are changes. We do this by storing the `NamespacedName` of the Pod, which includes the namespace and Pod name. For Deployments, rescheduling the Pod actually changes its name as the termination is generated. For StatefulSets, the name is kept the same no matter how many reschedules happen. Our caching approach prevents us form reevaluating the location of StatefulSet pods if they were previously scheduled, and we've seen this allocate StatefulSet pods to nodes whose architectures where not supported by the Pod. # Bugfix approach The intention of the cache is to reduce load over Registries and Noe itself. In our case so far StatefulSets are much less common than Deployments, so we choose to avoid the cache for StatefulSets. This is a stopgap measure to prevent misscheduling of current workloads until a better approach to prevent reprocessing of Pods can be devised that supports StatefulSets. # What we change We add a `skipCache(*v1.Pod)` function that checks if the Pod is owned by a StatefulSet. If so, the caching mechanism is skipped for this workload. Change-Id: Ie7bdf2d863f433e7998b1b92cea129c6bda4dd8f Co-authored-by: João Alves <[email protected]>
- Loading branch information
1 parent
62ea3e9
commit 8957c00
Showing
2 changed files
with
118 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters