Skip to content

Commit 55c50bc

Browse files
committed
Update status?
1 parent 0a2c9e8 commit 55c50bc

File tree

1 file changed

+4
-1
lines changed
  • pkg/lib/controller-runtime/client

1 file changed

+4
-1
lines changed

Diff for: pkg/lib/controller-runtime/client/ssa.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ func (c *ServerSideApplier) Apply(ctx context.Context, obj Object, changeFunc in
183183
return err
184184
}
185185

186-
if err := c.client.Status().Patch(ctx, cp, k8scontrollerclient.Apply, c.Owner); err != nil {
186+
pos := &k8scontrollerclient.SubResourcePatchOptions{}
187+
k8scontrollerclient.ForceOwnership.ApplyToPatch(&pos.PatchOptions)
188+
189+
if err := c.client.Status().Patch(ctx, cp, k8scontrollerclient.Apply, pos, c.Owner); err != nil {
187190
fmt.Printf("second patch error: %s\n", err)
188191
return err
189192
}

0 commit comments

Comments
 (0)