postgres-operator/pkg
Jairo Llopis a30dcea311
Protect operator CRDs from accidental deletion
A 'kubectl delete crd' is destructive: the API server cascades the
delete to every custom resource of that kind in the cluster, so a
single mistyped command can wipe out all postgresql, operator
configuration, postgresteam and fabriceventstream objects at once.
This is especially dangerous for an operator whose whole value
proposition is the data behind those CRs.

The fix is a 'acid.zalan.do/crd-protection' finalizer on each
operator CRD. The apiserver blocks the deletion while the finalizer
is set, so the destructive action is gated behind a manual step
(patch the finalizer away) that anyone running the delete has to
take deliberately.

Removal procedure is documented in docs/administrator.md under
'Protecting CRDs from accidental deletion'.

Assisted-by: OpenCode + MiniMax M3
2026-08-13 13:03:32 +01:00
..
apis Protect operator CRDs from accidental deletion 2026-08-13 13:03:32 +01:00
apiserver Add operator deployment readiness probe (#1874) 2023-01-05 18:29:47 +01:00
cluster Skip owner references on user secrets when secret deletion is disabled (#3165) 2026-08-11 17:22:39 +02:00
controller Protect operator CRDs from accidental deletion 2026-08-13 13:03:32 +01:00
generated Update to Go 1.26.4, build runners and go.mod depedencies (#3108) 2026-06-23 13:35:53 +02:00
spec Fix operatorconfigurations CRD: NamespacedName must render as type string (#3145) 2026-07-28 16:02:59 +02:00
teams Generate CRD for postgresteam resource (#3004) 2026-01-10 19:39:08 +01:00
util prepare bugfix release (#3147) 2026-07-29 10:51:00 +02:00