Skip to content

Commit

Permalink
Add setup to v2 controller
Browse files Browse the repository at this point in the history
  • Loading branch information
jm96441n committed Jan 25, 2024
1 parent 8f82437 commit 3f48a64
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion control-plane/api/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ const (
RouteAuthFilter string = "routeauthfilter"
GatewayPolicy string = "gatewaypolicy"

// V2 config entries.
// V2 resources.
TrafficPermissions string = "trafficpermissions"
GRPCRoute string = "grpcroute"
HTTPRoute string = "httproute"
TCPRoute string = "tcproute"
ProxyConfiguration string = "proxyconfiguration"
MeshGateway string = "meshgateway"
APIGateway string = "apigateway"
GatewayClass string = "gatewayclass"
GatewayClassConfig string = "gatewayclassconfig"
MeshConfiguration string = "meshconfiguration"
Expand Down
10 changes: 10 additions & 0 deletions control-plane/subcommand/inject-connect/v2controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@ func (c *Command) configureV2Controllers(ctx context.Context, mgr manager.Manage
return err
}

if err := (&resourceControllers.MeshGatewayController{
Controller: consulResourceController,
Client: mgr.GetClient(),
Log: ctrl.Log.WithName("controller").WithName(common.APIGateway),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", common.APIGateway)
return err
}

if err := (&resourceControllers.GatewayClassConfigController{
Controller: consulResourceController,
Client: mgr.GetClient(),
Expand Down

0 comments on commit 3f48a64

Please sign in to comment.