Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
  • Loading branch information
sttts committed Sep 4, 2023
1 parent 74b3726 commit f7474f1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/resource/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func (a *APIPatchingApplicator) Apply(ctx context.Context, obj client.Object, ao
err := a.client.Get(ctx, types.NamespacedName{Name: obj.GetName(), Namespace: obj.GetNamespace()}, current)
if kerrors.IsNotFound(err) {
// TODO(negz): Apply ApplyOptions here too?
log.Info("creating object")
return a.client.Create(ctx, obj)
}
if err != nil {
Expand Down Expand Up @@ -205,6 +206,7 @@ func (a *APIUpdatingApplicator) Apply(ctx context.Context, obj client.Object, ao
err := a.client.Get(ctx, types.NamespacedName{Name: obj.GetName(), Namespace: obj.GetNamespace()}, current)
if kerrors.IsNotFound(err) {
// TODO(negz): Apply ApplyOptions here too?
log.Info("creating object")
return a.client.Create(ctx, obj)
}
if err != nil {
Expand Down

0 comments on commit f7474f1

Please sign in to comment.