Files
cozystack/packages/system/redis-operator
Aleksei Sviridkin 56648783b3 fix(redis-operator): delete a PDB once it is disabled
The operator ensures the Sentinel and Redis PDBs only while
disablePodDisruptionBudget is unset. Setting it later stops the
updates but never deletes the PDB already created, and its owner
reference removes it only with the RedisFailover. A Redis instance
scaled down to one pod thus keeps a minAvailable 1 PDB on its single
Sentinel, which refuses every eviction and blocks node drains.

While the PDB is disabled, look it up on reconcile and delete it only
when this RedisFailover controls it: a PDB created by someone else
under the same name is not the operator's to remove. No delete is
sent when there is no PDB, and one that disappears between the lookup
and the delete counts as done. The delete carries the UID and
resourceVersion it checked, so a PDB replaced or re-owned between the
lookup and the delete is left for the next reconcile to judge.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-12-02 05:45:52 +03:00
..