Skip to content

Commit

Permalink
Copy the finalizers from the observed to desired object on resource u…
Browse files Browse the repository at this point in the history
…pdate
  • Loading branch information
amirahav authored Feb 1, 2025
1 parent dc78f7d commit cf49e5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/controller/instance/controller_reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ func (igr *instanceGraphReconciler) updateResource(
igr.instanceSubResourcesLabeler.ApplyLabels(desired)

// Apply changes to the resource
// TODO: Handle annotations
desired.SetResourceVersion(observed.GetResourceVersion())
desired.SetFinalizers(observed.GetFinalizers())
_, err = rc.Update(ctx, desired, metav1.UpdateOptions{})
if err != nil {
resourceState.State = "ERROR"
Expand Down

0 comments on commit cf49e5e

Please sign in to comment.