Aias00 commented on code in PR #7288:
URL: https://github.com/apache/shenyu/pull/7288#discussion_r4109923516


##########
shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/GrpcParser.java:
##########
@@ -153,6 +153,10 @@ private List<GrpcUpstream> parseDefaultService(final 
V1IngressBackend defaultBac
             String serviceName = defaultBackend.getService().getName();
             // shenyu routes directly to the container
             V1Endpoints v1Endpoints = 
endpointsLister.namespace(namespace).get(serviceName);
+            if (Objects.isNull(v1Endpoints)) {
+                LOG.info("Endpoints {} not found for grpc default backend", 
serviceName);

Review Comment:
   Suggestion (non-blocking): for divide and websocket an empty result here is 
repaired later - EndpointsReconciler#updateSelectors only covers 
ENDPOINT_UPSTREAM_PLUGINS = {divide, websocket} (EndpointsReconciler.java:60), 
and IngressReconciler#updateUpstreamFromEndpoints returns early unless the 
plugin is divide or websocket (IngressReconciler.java:569). There is no 
equivalent refill path for gRPC, so this ingress keeps an empty upstream handle 
until the ingress changes again or the controller restarts. Still much better 
than the previous NPE (the ingress was never configured at all), but please 
consider logging this at WARN so operators can tell a transient rollout from an 
upstream list that will never be filled in.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to