Skip to content

Commit

Permalink
Fixing reconcile due to failing integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Boomatang committed Dec 14, 2023
1 parent a63bb02 commit b2b95d1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions controllers/kuadrant_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package controllers
import (
"context"
"encoding/json"
"reflect"

"github.com/kuadrant/kuadrant-operator/pkg/kuadranttools"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -508,6 +509,22 @@ func (r *KuadrantReconciler) reconcileLimitador(ctx context.Context, kObj *kuadr
limitador.Spec.Storage = kObj.Spec.Limitador.Storage
}
}

tmp := &limitadorv1alpha1.Limitador{
ObjectMeta: metav1.ObjectMeta{
Name: "temp",
Namespace: kObj.Namespace,
},
}
err = r.SetOwnerReference(kObj, tmp)
if err != nil {
return err
}

if limitador.OwnerReferences != nil && !reflect.DeepEqual(tmp.OwnerReferences, limitador.OwnerReferences) {
return nil
}

err = r.SetOwnerReference(kObj, limitador)
if err != nil {
return err
Expand Down

0 comments on commit b2b95d1

Please sign in to comment.