Skip to content

fix: add missing pod-disruption-budget selectors

Sigitas Zelenkovas requested to merge (removed):fix-pdb-selector into master

Problem:
Current PodDisruptionBudget includes initialize/migrate jobs into pod count calculations. Prevents disruption in situations when should be allowed.

Example situation where PDB misbehaves:
Deployment with replicas: 3 replicas and 1 job which is completed.
Disruption budget is configured for: maxUnavailable: 1.
PDB will not allow disruption, because completed job was included in the disruption budget calculation.

pdb
pods

Expected behavior:
To allow 1 disruption if maxUnavailable: 1

Solution:
Add missing tier and track selectors, so only main application pods are selected during disruption checks.
fixed-pdb

Edited by Sigitas Zelenkovas

Merge request reports