Skip to content

Commit

Permalink
Added controller name for external-configuration-controller
Browse files Browse the repository at this point in the history
  • Loading branch information
cheina97 committed Oct 2, 2024
1 parent 0518a5f commit cad6d20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/liqo-controller-manager/modules/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func SetupNetworkingModule(ctx context.Context, mgr manager.Manager, opts *Netwo
extCfgReconciler := externalnetworkroute.NewConfigurationReconciler(mgr.GetClient(), mgr.GetScheme(),
mgr.GetEventRecorderFor("external-configuration-controller"))
if err := extCfgReconciler.SetupWithManager(mgr); err != nil {
klog.Errorf("unable to create controller externalConfigurationReconciler: %s", err)
klog.Errorf("unable to create controller %s: %s", externalnetworkroute.ControllerName, err)
return err
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ import (
"github.com/liqotech/liqo/pkg/utils/getters"
)

// ControllerName is the name of the controller.
const ControllerName = "externalConfiguration"

// ConfigurationReconciler manage Configuration.
type ConfigurationReconciler struct {
client.Client
Expand Down Expand Up @@ -90,7 +93,7 @@ func (r *ConfigurationReconciler) SetupWithManager(mgr ctrl.Manager) error {
if err != nil {
return err
}
return ctrl.NewControllerManagedBy(mgr).
return ctrl.NewControllerManagedBy(mgr).Named(ControllerName).
For(&networkingv1beta1.Configuration{}, builder.WithPredicates(p)).
Watches(
&networkingv1beta1.GatewayServer{},
Expand Down

0 comments on commit cad6d20

Please sign in to comment.