Skip to content

Commit

Permalink
clean-up controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdiramen committed Feb 22, 2024
1 parent 631964b commit f3a953e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions internal/controller/gateway/gateway_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ package gateway
import (
"context"

ingressv1alpha1 "github.com/ngrok/kubernetes-ingress-controller/api/ingress/v1alpha1"
//internalerrors "github.com/ngrok/kubernetes-ingress-controller/internal/errors"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/tools/record"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"

"github.com/go-logr/logr"
ingressv1alpha1 "github.com/ngrok/kubernetes-ingress-controller/api/ingress/v1alpha1"
"github.com/ngrok/kubernetes-ingress-controller/internal/controller/utils"
"github.com/ngrok/kubernetes-ingress-controller/internal/store"
)
Expand All @@ -62,14 +61,12 @@ type GatewayReconciler struct {
//+kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gateways/status,verbs=get;list;watch;update
//+kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gatewayclasses,verbs=get;list;watch;update
//+kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gatewayclasses/status,verbs=get;list;watch;update

func (r *GatewayReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
log := r.Log.WithValues("Gateway", req.NamespacedName)
ctx = ctrl.LoggerInto(ctx, log)

gw := new(gatewayv1.Gateway)
err := r.Client.Get(ctx, req.NamespacedName, gw)
r.Log.Info("the request", "rq", req)
switch {
case err == nil:
// all good, continue
Expand Down

0 comments on commit f3a953e

Please sign in to comment.