Skip to content

removed finalizer from core k8s resources#1839

Merged
vrutkovs merged 1 commit intomasterfrom
remove-finalizer-from-core-resources
Feb 27, 2026
Merged

removed finalizer from core k8s resources#1839
vrutkovs merged 1 commit intomasterfrom
remove-finalizer-from-core-resources

Conversation

@AndrewChubatiuk
Copy link
Contributor

@AndrewChubatiuk AndrewChubatiuk commented Feb 21, 2026

related to #835, #1773, #1845

this PR removes finalizer on core resources. Finalizer only complicates reconcile and may lead to dangling resources. Additionally keeping removed resource till the next reconciliation is not needed as no additional cleanup actions are performed. with this change finalizer will be removed from existing core resources and will not be added to new ones, but CR deletion still performs finalizer removal for smooth migration

made controller.disableCRDOwnership flag noop, removed owner reference from cluster wide resources and using selector instead.

In later versions we could keep only finalizer removal for CR and drop other API calls


Summary by cubic

Remove operator-added finalizers from core Kubernetes resources to prevent stuck deletions and simplify reconciliation (addresses #835). Finalizers remain only on CRs; existing core objects have legacy finalizers removed during reconcile, and new ones are created without them.

  • Refactors

    • Stop adding finalizers in builders for Services, ServiceAccounts, Deployments, StatefulSets, PVCs, PDBs, VPA/HPA, Ingress/HTTPRoute, ConfigMaps, Secrets, and RBAC.
    • Reconcile now removes legacy finalizers on core objects (mergeMeta updated); finalize paths switch to selector-based orphan cleanup with a remove flag; cluster-wide RBAC cleanup respects the cluster-wide access flag and no longer uses OwnerReferences.
    • Remove CRD ownership helpers and all AsCRDOwner methods; no OwnerReferences or finalizers on cluster-scoped RBAC; controller.disableCRDOwnership is a no-op.
    • Minor updates: VMUser.SecretName -> PrefixedName; small logging and rules ConfigMap cleanups; config and utils tidied (maps.Copy, min); tests, docs, and changelog updated.
  • Dependencies

    • Bump KIND_VERSION to v0.31.0.

Written for commit c7bed6c. Summary will update on new commits.

@AndrewChubatiuk AndrewChubatiuk force-pushed the remove-finalizer-from-core-resources branch from 9bed397 to 4fbfd83 Compare February 21, 2026 16:01
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 59 files

@AndrewChubatiuk AndrewChubatiuk force-pushed the remove-finalizer-from-core-resources branch 13 times, most recently from bb2bde7 to bf7390b Compare February 22, 2026 15:16
@AndrewChubatiuk AndrewChubatiuk force-pushed the remove-finalizer-from-core-resources branch from 9a8b813 to 500bb28 Compare February 24, 2026 19:23
@AndrewChubatiuk AndrewChubatiuk force-pushed the remove-finalizer-from-core-resources branch 6 times, most recently from 15496b5 to 53372c8 Compare February 26, 2026 19:51
@AndrewChubatiuk AndrewChubatiuk force-pushed the remove-finalizer-from-core-resources branch 3 times, most recently from 191b9ac to 8a2ff1f Compare February 27, 2026 07:05
@AndrewChubatiuk AndrewChubatiuk force-pushed the remove-finalizer-from-core-resources branch from 8a2ff1f to c7bed6c Compare February 27, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants