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 11, 2023
1 parent 1b7d0c6 commit 94bb3f3
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
}

Check warning on line 510 in controllers/kuadrant_controller.go

View check run for this annotation

Codecov / codecov/patch

controllers/kuadrant_controller.go#L496-L510

Added lines #L496 - L510 were not covered by tests
}

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

Check warning on line 522 in controllers/kuadrant_controller.go

View check run for this annotation

Codecov / codecov/patch

controllers/kuadrant_controller.go#L521-L522

Added lines #L521 - L522 were not covered by tests

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 94bb3f3

Please sign in to comment.