Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow deletion of unhealthy pods if enough healthy
Currently, if you have a PDB with 0 disruptions available and you attempt to evict a non-healthy pod, the eviction request will always fail. This is because the eviction API does not currently take in to account that the pod you are removing is the unhealthy one. This commit accounts for trying to evict an unhealthy pod as long as there are enough healthy pods to satisfy the PDB's requirements. To protect against race conditions, a ResourceVersion constraint is enforced. This will ensure that the target pod does not go healthy and allow any race condition to occur which might disrupt too many pods at once. This commit also eliminates superfluous class to DeepCopy for the deleteOptions struct.
- Loading branch information
1 parent
9f3d747
commit d9d68b7
Showing
3 changed files
with
165 additions
and
18 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