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 6, 2023
1 parent 1500738 commit 5b43903
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 @@ -497,6 +498,22 @@ func (r *KuadrantReconciler) reconcileLimitador(ctx context.Context, kObj *kuadr
limitador.Spec.Storage = kObj.Spec.Limitador.Storage
}

Check warning on line 499 in controllers/kuadrant_controller.go

View check run for this annotation

Codecov / codecov/patch

controllers/kuadrant_controller.go#L485-L499

Added lines #L485 - L499 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 511 in controllers/kuadrant_controller.go

View check run for this annotation

Codecov / codecov/patch

controllers/kuadrant_controller.go#L510-L511

Added lines #L510 - L511 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 5b43903

Please sign in to comment.