Skip to content

Commit 22eb3c8

Browse files
committed
fixup! refactor: updated IP controller for new ipam
1 parent ebeadec commit 22eb3c8

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

cmd/liqo-controller-manager/modules/networking.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
package modules
1616

1717
import (
18-
"context"
19-
2018
"k8s.io/client-go/dynamic"
2119
"k8s.io/klog/v2"
2220
"sigs.k8s.io/controller-runtime/pkg/manager"
@@ -61,15 +59,15 @@ type NetworkingOption struct {
6159
}
6260

6361
// SetupNetworkingModule setup the networking module and initializes its controllers .
64-
func SetupNetworkingModule(ctx context.Context, mgr manager.Manager, opts *NetworkingOption) error {
62+
func SetupNetworkingModule(mgr manager.Manager, opts *NetworkingOption) error {
6563
networkReconciler := networkctrl.NewNetworkReconciler(mgr.GetClient(), mgr.GetScheme(), opts.IpamClient)
6664
if err := networkReconciler.SetupWithManager(mgr, opts.NetworkWorkers); err != nil {
6765
klog.Errorf("Unable to start the networkReconciler: %v", err)
6866
return err
6967
}
7068

7169
ipReconciler := ipctrl.NewIPReconciler(mgr.GetClient(), mgr.GetScheme(), opts.IpamClient)
72-
if err := ipReconciler.SetupWithManager(ctx, mgr, opts.IPWorkers); err != nil {
70+
if err := ipReconciler.SetupWithManager(mgr, opts.IPWorkers); err != nil {
7371
klog.Errorf("Unable to start the ipReconciler: %v", err)
7472
return err
7573
}

pkg/liqo-controller-manager/networking/ip-controller/ip_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (r *IPReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Re
145145
}
146146

147147
// SetupWithManager monitors IP resources.
148-
func (r *IPReconciler) SetupWithManager(_ context.Context, mgr ctrl.Manager, workers int) error {
148+
func (r *IPReconciler) SetupWithManager(mgr ctrl.Manager, workers int) error {
149149
return ctrl.NewControllerManagedBy(mgr).Named(consts.CtrlIP).
150150
For(&ipamv1alpha1.IP{}).
151151
Owns(&v1.Service{}).

0 commit comments

Comments
 (0)