Skip to content

Commit

Permalink
reconciler/managed: fix RetryingCriticalAnnotationUpdater to support …
Browse files Browse the repository at this point in the history
…namespaces

Signed-off-by: Dr. Stefan Schimanski <[email protected]>
  • Loading branch information
sttts committed Jan 5, 2024
1 parent d23a82b commit 1355caf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/reconciler/managed/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (u *RetryingCriticalAnnotationUpdater) UpdateCriticalAnnotations(ctx contex
err := retry.OnError(retry.DefaultRetry, resource.IsAPIError, func() error {
err := u.client.Update(ctx, o)
if kerrors.IsConflict(err) {
if getErr := u.client.Get(ctx, types.NamespacedName{Name: o.GetName()}, o); getErr != nil {
if getErr := u.client.Get(ctx, client.ObjectKeyFromObject(o), o); getErr != nil {
return getErr
}
meta.AddAnnotations(o, a)
Expand Down

0 comments on commit 1355caf

Please sign in to comment.