@@ -145,19 +145,15 @@ func setupControllers(ctx context.Context, mgr manager.Manager, pro provider.Pro
145145 Updater : updater ,
146146 Readier : readier ,
147147 },
148- << << << < HEAD
149- & gatewayv1.GRPCRoute {}: & controller.GRPCRouteReconciler {
150- == == == =
151- & controller.TCPRouteReconciler {
148+ & gatewayv1alpha2.TCPRoute {}: & controller.TCPRouteReconciler {
152149 Client : mgr .GetClient (),
153150 Scheme : mgr .GetScheme (),
154151 Log : ctrl .LoggerFrom (ctx ).WithName ("controllers" ).WithName (types .KindTCPRoute ),
155152 Provider : pro ,
156153 Updater : updater ,
157154 Readier : readier ,
158155 },
159- & controller.GRPCRouteReconciler {
160- >> >> >> > 0 fd8e9d7 (feat : add support for TCPRoute (#2564 ))
156+ & gatewayv1.GRPCRoute {}: & controller.GRPCRouteReconciler {
161157 Client : mgr .GetClient (),
162158 Scheme : mgr .GetScheme (),
163159 Log : ctrl .LoggerFrom (ctx ).WithName ("controllers" ).WithName (types .KindGRPCRoute ),
@@ -252,57 +248,7 @@ func setupControllers(ctx context.Context, mgr manager.Manager, pro provider.Pro
252248 Scheme : mgr .GetScheme (),
253249 Log : ctrl .LoggerFrom (ctx ).WithName ("controllers" ).WithName (types .KindApisixUpstream ),
254250 Updater : updater ,
255- << << << < HEAD
256251 ICGV : icgv ,
257- == == == =
258- },
259- & controller.GatewayProxyController {
260- Client : mgr .GetClient (),
261- Scheme : mgr .GetScheme (),
262- Log : ctrl .LoggerFrom (ctx ).WithName ("controllers" ).WithName (types .KindGatewayProxy ),
263- Provider : pro ,
264- },
265- }, nil
266- }
267-
268- func registerReadinessGVK (c client.Client , readier readiness.ReadinessManager ) {
269- log := ctrl .LoggerFrom (context .Background ()).WithName ("readiness" )
270- readier .RegisterGVK ([]readiness.GVKConfig {
271- {
272- GVKs : []schema.GroupVersionKind {
273- types .GvkOf (& gatewayv1.HTTPRoute {}),
274- types .GvkOf (& gatewayv1alpha2.TCPRoute {}),
275- types .GvkOf (& gatewayv1.GRPCRoute {}),
276- },
277- },
278- {
279- GVKs : []schema.GroupVersionKind {
280- types .GvkOf (& netv1.Ingress {}),
281- types .GvkOf (& apiv2.ApisixRoute {}),
282- types .GvkOf (& apiv2.ApisixGlobalRule {}),
283- types .GvkOf (& apiv2.ApisixPluginConfig {}),
284- types .GvkOf (& apiv2.ApisixTls {}),
285- types .GvkOf (& apiv2.ApisixConsumer {}),
286- types .GvkOf (& apiv2.ApisixUpstream {}),
287- },
288- Filter : readiness .GVKFilter (func (obj * unstructured.Unstructured ) bool {
289- icName , _ , _ := unstructured .NestedString (obj .Object , "spec" , "ingressClassName" )
290- ingressClass , _ := controller .FindMatchingIngressClassByName (context .Background (), c , log , icName )
291- return ingressClass != nil
292- }),
293- },
294- {
295- GVKs : []schema.GroupVersionKind {
296- types .GvkOf (& v1alpha1.Consumer {}),
297- },
298- Filter : readiness .GVKFilter (func (obj * unstructured.Unstructured ) bool {
299- consumer := & v1alpha1.Consumer {}
300- if err := runtime .DefaultUnstructuredConverter .FromUnstructured (obj .Object , consumer ); err != nil {
301- return false
302- }
303- return controller .MatchConsumerGatewayRef (context .Background (), c , log , consumer )
304- }),
305- >> >> >> > 0 fd8e9d7 (feat : add support for TCPRoute (#2564 ))
306252 },
307253 }... )
308254
@@ -356,6 +302,9 @@ func registerGatewayAPIForReadinessGVK(mgr manager.Manager, readier readiness.Re
356302 if utils .HasAPIResource (mgr , & gatewayv1.GRPCRoute {}) {
357303 gvks = append (gvks , types .GvkOf (& gatewayv1.GRPCRoute {}))
358304 }
305+ if utils .HasAPIResource (mgr , & gatewayv1alpha2.TCPRoute {}) {
306+ gvks = append (gvks , types .GvkOf (& gatewayv1alpha2.TCPRoute {}))
307+ }
359308 if len (gvks ) == 0 {
360309 return
361310 }
0 commit comments