Skip to content

Commit

Permalink
Refactor naming
Browse files Browse the repository at this point in the history
  • Loading branch information
kolodziejczak committed Dec 9, 2024
1 parent 49d10ba commit 662b07e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion controllers/gateway/ratelimit/ratelimit_disabled.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"
)

func SetupRateLimit(_ manager.Manager, _ *runtime.Scheme) error {
func Setup(_ manager.Manager, _ *runtime.Scheme) error {
return nil
}
6 changes: 3 additions & 3 deletions controllers/gateway/ratelimit/ratelimit_enabled.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
package ratelimit

import (
gatewayv1alpha1 "github.com/kyma-project/api-gateway/apis/gateway/ratelimit/v1alpha1"
ratelimitv1alpha1 "github.com/kyma-project/api-gateway/apis/gateway/ratelimit/v1alpha1"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"sigs.k8s.io/controller-runtime/pkg/manager"
)

func SetupRateLimit(mgr manager.Manager, scheme *runtime.Scheme) error {
utilruntime.Must(gatewayv1alpha1.AddToScheme(scheme))
func Setup(mgr manager.Manager, scheme *runtime.Scheme) error {
utilruntime.Must(ratelimitv1alpha1.AddToScheme(scheme))
return (&RateLimitReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func main() {
os.Exit(1)
}

if err = ratelimit.SetupRateLimit(mgr, scheme); err != nil {
if err = ratelimit.Setup(mgr, scheme); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "RateLimit")
os.Exit(1)
}
Expand Down

0 comments on commit 662b07e

Please sign in to comment.