Merge pull request #15668 from rook/mergify/bp/release-1.17/pr-15634

osd: fix pdbs in case of node drain (backport #15634)
This commit is contained in:
mergify[bot] authored and GitHub committed 2025-04-07 16:34:49 +00:00
commit 33ee5617b8
2 files changed
+1 -2

No files matched your search

@@ -69,7 +69,7 @@ func pdbPredicate[T *policyv1.PodDisruptionBudget]() predicate.TypedFuncs[T] {
UpdateFunc: func(e event.TypedUpdateEvent[T]) bool {
pdb := (*policyv1.PodDisruptionBudget)(e.ObjectNew)
// reconcile for the main PDB update event when first OSD goes down, that is, when `DisruptionsAllowed` gets updated to 0.
// reconcile for the main PDB update event when first OSD goes down, that is, when `DisruptionsAllowed` gets updated to 0.
return pdb.Name == osdPDBAppName && pdb.Spec.MaxUnavailable.IntVal == 1 && pdb.Status.DisruptionsAllowed == 0
},
DeleteFunc: func(e event.TypedDeleteEvent[T]) bool {
@@ -268,7 +268,6 @@ func (r *ReconcileClusterDisruption) reconcilePDBsForOSDs(
maxUnavailableOSDCount = 1
} else {
maxUnavailableOSDCount = len(downOSDs) + 1
resetPDBConfig(pdbStateMap)
}
} else {
maxUnavailableOSDCount = len(downOSDs) + 1