diff --git a/controllers/gateway/ratelimit/ratelimit_disabled.go b/controllers/gateway/ratelimit/ratelimit_disabled.go index f9614ae6c..22d6b9929 100644 --- a/controllers/gateway/ratelimit/ratelimit_disabled.go +++ b/controllers/gateway/ratelimit/ratelimit_disabled.go @@ -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 } diff --git a/controllers/gateway/ratelimit/ratelimit_enabled.go b/controllers/gateway/ratelimit/ratelimit_enabled.go index 524cbc89b..bccd23e63 100644 --- a/controllers/gateway/ratelimit/ratelimit_enabled.go +++ b/controllers/gateway/ratelimit/ratelimit_enabled.go @@ -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(), diff --git a/main.go b/main.go index 11cca1ea1..408d388e6 100644 --- a/main.go +++ b/main.go @@ -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) }