:seedling: Use Patch instead of Update for finalizer operations by tmshort · Pull Request #2328 · operator-framework/operator-controller

joelanford

joelanford

joelanford

joelanford

joelanford

@tmshort tmshort changed the title 🐛 Use Patch instead of Update for finalizer operations 🐛 Use SSA instead of Update for finalizer operations

Nov 13, 2025

pedjak

@tmshort tmshort changed the title WIP: Use SSA instead of Update for finalizer operations 🌱 Use Patch instead of Update for finalizer operations

Nov 19, 2025

pedjak

tmshort

pedjak

pedjak

pedjak

Refactor all controllers to use Patch() instead of Update()
when adding or removing finalizers to improve performance, and to avoid
removing non-cached fields erroneously.

This is necesary because we no longer cache the last-applied-configuration
annotation, so when we add/remove the finalizers, we are removing that field
from the metadata. This causes issues with clients when they don't see that
annotation (e.g. apply the same ClusterExtension twice).

Update ClusterCatalog and ClusterExtension controllers to use Patch-based
funalizer management (ClusterExtensionRevision already uses Patch())

Signed-off-by: Todd Short <tshort@redhat.com>

@tmshort

rashmigottipati

@openshift-ci openshift-ci bot added the approved

Indicates a PR has been approved by an approver from all required OWNERS files.

label

Dec 2, 2025