Skip to content

Commit

Permalink
Merge pull request #289 from rewantsoni/fix-reconcile-loop
Browse files Browse the repository at this point in the history
controllers: use semantic deepequal
  • Loading branch information
openshift-merge-bot[bot] authored Dec 4, 2024
2 parents c99a838 + 857baae commit 3bfb808
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/utils/k8sutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"fmt"
"maps"
"os"
"reflect"
"time"

"k8s.io/apimachinery/pkg/api/equality"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -153,7 +153,7 @@ func CreateOrReplace(ctx context.Context, c client.Client, obj client.Object, f
return err
}

if reflect.DeepEqual(existing, obj) {
if equality.Semantic.DeepEqual(existing, obj) {
return nil
}

Expand Down

0 comments on commit 3bfb808

Please sign in to comment.