Skip to content

Commit 896034a

Browse files
committed
fix(controller): Finish loop early when a PDB is deleted to avoid StorageErrors
Signed-off-by: Michael Riesberg-Timmer <MichaelRT@pallid.dev>
1 parent f2818d0 commit 896034a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,10 @@ func (n *PDBController) reconcilePDBs(ctx context.Context, desiredPDBs, managedP
208208
"namespace": managedPDB.Namespace,
209209
"selector": managedPDB.Spec.Selector.String(),
210210
}).Info("")
211+
212+
// If we delete a PDB then we don't want to attempt to update it later since this will
213+
// result in a `StorageError` since we can't find the PDB to make an update to it.
214+
continue
211215
}
212216

213217
// check if PDBs are equal an only update if not

0 commit comments

Comments
 (0)