Skip to content

Commit

Permalink
fix: always use FieldManager for Create/Patch/Update calls
Browse files Browse the repository at this point in the history
  • Loading branch information
rquitales committed Sep 21, 2024
1 parent 832422e commit c18cfe1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion operator/internal/controller/auto/update_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (r *UpdateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctr
meta.SetStatusCondition(&obj.Status.Conditions, *rs.failed)
rs.complete.ObservedGeneration = obj.Generation
meta.SetStatusCondition(&obj.Status.Conditions, *rs.complete)
return r.Status().Update(ctx, obj)
return r.Status().Update(ctx, obj, client.FieldOwner(FieldManager))
}

if rs.complete.Status == metav1.ConditionTrue {
Expand Down
2 changes: 1 addition & 1 deletion operator/internal/controller/pulumi/stack_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ func (r *StackReconciler) Reconcile(ctx context.Context, request ctrl.Request) (
}

saveStatus := func() error {
if err := r.Status().Update(ctx, instance); err != nil {
if err := r.Status().Update(ctx, instance, client.FieldOwner(FieldManager)); err != nil {
log.Error(err, "unable to save object status")
return err
}
Expand Down

0 comments on commit c18cfe1

Please sign in to comment.