Skip to content

Commit

Permalink
[rlc] Using common.LimitadorName instead of removed rlptools
Browse files Browse the repository at this point in the history
  • Loading branch information
didierofrivia committed Nov 29, 2022
1 parent d7f074b commit 4d451fc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions controllers/ratelimitpolicy_cluster_envoy_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
kuadrantv1beta1 "github.com/kuadrant/kuadrant-operator/api/v1beta1"
"github.com/kuadrant/kuadrant-operator/pkg/common"
kuadrantistioutils "github.com/kuadrant/kuadrant-operator/pkg/istio"
"github.com/kuadrant/kuadrant-operator/pkg/rlptools"
)

func (r *RateLimitPolicyReconciler) reconcileRateLimitingClusterEnvoyFilter(ctx context.Context, rlp *kuadrantv1beta1.RateLimitPolicy, gwDiffObj *gatewayDiff) error {
Expand Down Expand Up @@ -99,7 +98,7 @@ func (r *RateLimitPolicyReconciler) gatewayRateLimitingClusterEnvoyFilter(
return ef, nil
}

limitadorKey := client.ObjectKey{Name: rlptools.LimitadorName, Namespace: kuadrantNamespace}
limitadorKey := client.ObjectKey{Name: common.LimitadorName, Namespace: kuadrantNamespace}

limitador := &limitadorv1alpha1.Limitador{}
err = r.Client().Get(ctx, limitadorKey, limitador)
Expand Down
4 changes: 2 additions & 2 deletions controllers/ratelimitpolicy_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ var _ = Describe("RateLimitPolicy controller", func() {
// Check Limitador Status is Ready
Eventually(func() bool {
limitador := &limitadorv1alpha1.Limitador{}
err := k8sClient.Get(context.Background(), client.ObjectKey{Name: rlptools.LimitadorName, Namespace: testNamespace}, limitador)
err := k8sClient.Get(context.Background(), client.ObjectKey{Name: common.LimitadorName, Namespace: testNamespace}, limitador)
if err != nil {
return false
}
Expand Down Expand Up @@ -211,7 +211,7 @@ var _ = Describe("RateLimitPolicy controller", func() {
common.RateLimitPolicyBackRefAnnotation, client.ObjectKeyFromObject(rlp).String()))

// check limits
limitadorKey := client.ObjectKey{Name: rlptools.LimitadorName, Namespace: testNamespace}
limitadorKey := client.ObjectKey{Name: common.LimitadorName, Namespace: testNamespace}
existingLimitador := &limitadorv1alpha1.Limitador{}
err = k8sClient.Get(context.Background(), limitadorKey, existingLimitador)
// must exist
Expand Down
2 changes: 1 addition & 1 deletion controllers/ratelimitpolicy_limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (r *RateLimitPolicyReconciler) reconcileLimits(ctx context.Context, rlp *ku
return err
}

limitadorKey := client.ObjectKey{Name: rlptools.LimitadorName, Namespace: kuadrantNamespace}
limitadorKey := client.ObjectKey{Name: common.LimitadorName, Namespace: kuadrantNamespace}
limitador := &limitadorv1alpha1.Limitador{}
err = r.Client().Get(ctx, limitadorKey, limitador)
logger.V(1).Info("reconcileLimits", "get limitador", limitadorKey, "err", err)
Expand Down

0 comments on commit 4d451fc

Please sign in to comment.