-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to apply caps only on alive pods
A pod can be in one of five phases: running, pending, succeeded, failed or unknown. The pods which are not in the running/pending phase do not consume any CPU/Memory resources, they just need to be GC'ed. If, in the scenario when a cap has been specified on a k8s cloud (single namespace) and let's say 40% of the count are in the 'failed' phase, and 60% are 'runnning/pending', newer pods will not be spawned in that namespace, since the plugin will count all those pods for instance/pod cap and even though it could have spawned 40% more pods, it won't and jobs will starve. This patch adds an option to calculate the cap for pods only in the 'running' or 'pending' phase, on a cloud level and on a pod template level, so that the cap applies to only those pods which are alive or about to be. Change-Id: Id77e837aa9a42742618cd3c543e7b99f9d38a10a
- Loading branch information
1 parent
63994c5
commit a615156
Showing
4 changed files
with
47 additions
and
0 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
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