Skip to content

Commit

Permalink
chore: CR
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
  • Loading branch information
xvzf committed Oct 21, 2024
1 parent b2d5090 commit 2f6f42c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions common/flagdproxy/flagdproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,14 @@ func (f *FlagdProxyHandler) ensureFlagdProxyResource(ctx context.Context, obj cl
return err
}

// If the object exists but is not managed by OFO, return an error
if !notFound && !common.IsManagedByOFO(old) {
return fmt.Errorf("%s not managed by OFO", obj.GetName())
}

// If the object is not found, we will create it
if notFound {
return f.Client.Create(ctx, obj)
}
// If the object exists but is not managed by OFO, return an error
if !common.IsManagedByOFO(old) {
return fmt.Errorf("%s not managed by OFO", obj.GetName())
}

// If the object is found, update if necessary
needsUpdate, err := specDiffers(obj, old)
Expand Down

0 comments on commit 2f6f42c

Please sign in to comment.