ronething commented on code in PR #2489:
URL: 
https://github.com/apache/apisix-ingress-controller/pull/2489#discussion_r2227146032


##########
internal/manager/controllers.go:
##########
@@ -176,3 +193,41 @@ func setupControllers(ctx context.Context, mgr 
manager.Manager, pro provider.Pro
                },
        }, nil
 }
+
+func registerReadinessGVK(c client.Client, readier readiness.ReadinessManager) 
{
+       log := ctrl.LoggerFrom(context.Background()).WithName("readiness")
+       readier.RegisterGVK([]readiness.GVKConfig{
+               {
+                       GVKs: []schema.GroupVersionKind{
+                               types.GvkOf(&gatewayv1.HTTPRoute{}),
+                       },
+               },
+               {
+                       GVKs: []schema.GroupVersionKind{
+                               types.GvkOf(&netv1.Ingress{}),
+                               types.GvkOf(&apiv2.ApisixRoute{}),
+                               types.GvkOf(&apiv2.ApisixGlobalRule{}),
+                               types.GvkOf(&apiv2.ApisixPluginConfig{}),
+                               types.GvkOf(&apiv2.ApisixTls{}),
+                               types.GvkOf(&apiv2.ApisixConsumer{}),
+                       },
+                       Filter: readiness.GVKFilter(func(obj 
*unstructured.Unstructured) bool {
+                               icName, _, _ := 
unstructured.NestedString(obj.Object, "spec", "ingressClassName")
+                               ingressClass, _ := 
controller.GetIngressClass(context.Background(), c, log, icName)
+                               return ingressClass != nil
+                       }),

Review Comment:
   If there is no ingressClassName field, will we ignore it directly?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to