Merge pull request #635 from sttts/sttts-external-client-namespaced

reconciler/managed: fix RetryingCriticalAnnotationUpdater to support namespaces
This commit is contained in:
Nic Cope 2024-01-05 12:41:35 -08:00 committed by GitHub
commit bc3a043a97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)