Skip to content

Commit

Permalink
labeller: add a field manager
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
  • Loading branch information
stevekuznetsov committed Oct 25, 2023
1 parent 7e8d77c commit c9d8781
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/operators/labeller/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func ObjectLabeler[T metav1.Object, A ApplyConfig[A]](
install.OLMManagedLabelKey: install.OLMManagedLabelValue,
})

_, err := apply(cast.GetNamespace(), ctx, cfg, metav1.ApplyOptions{})
_, err := apply(cast.GetNamespace(), ctx, cfg, metav1.ApplyOptions{FieldManager: "olm"})
return err
}
}
Expand Down Expand Up @@ -166,7 +166,7 @@ func ObjectPatchLabeler(
return fmt.Errorf("failed to create patch for %s/%s: %w", cast.GetNamespace(), cast.GetName(), err)
}

_, err = patch(ctx, cast.GetName(), types.MergePatchType, patchBytes, metav1.PatchOptions{})
_, err = patch(ctx, cast.GetName(), types.MergePatchType, patchBytes, metav1.PatchOptions{FieldManager: "olm"})
return err
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/operators/labeller/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func ContentHashLabeler[T metav1.Object, A ApplyConfig[A]](
cfg.WithLabels(map[string]string{
resolver.ContentHashLabelKey: hash,
})
_, err = apply(cast.GetNamespace(), ctx, cfg, metav1.ApplyOptions{})
_, err = apply(cast.GetNamespace(), ctx, cfg, metav1.ApplyOptions{FieldManager: "olm"})
return err
}
}
Expand Down

0 comments on commit c9d8781

Please sign in to comment.