Ordered Deletion

1 min read

When a CR is deleted, Orkestra runs the onDelete: block before removing the finalizer. By default, all resource groups execute concurrently — deletion requests are submitted in parallel and the finalizer is removed immediately.

Orkestra provides two models when the sequence matters.


When you need it

Most operators do not need ordered deletion. Owner references and Kubernetes garbage collection handle cascade deletion correctly for the common case.

Ordered deletion is for the cases where sequence matters:

  • A cleanup Job must complete before its target is deleted
  • Infrastructure must be deprovisioned before its credentials Secret is removed
  • A final backup must complete before the workload is torn down

Two models

Hard orderedCondition-based
Mechanismordered: truewhen: / anyOf: conditions
FinalizerHeld until completeNever held
CR can get stuckYes (on timeout)Never
GuaranteeSequential, enforcedBest-effort
Use caseSafety-critical cleanupOptional sequencing

Where to go next