Aias00 opened a new issue, #6865:
URL: https://github.com/apache/shenyu/issues/6865

   ## Description
   In `getZookeeperUrl`, when the zookeeper register address is a k8s service 
name (not a direct IP), line 312 fetches `V1Endpoints v1Endpoints = 
namespace.get(zookeeperK8sIpUrl)`. Line 313 immediately calls 
`v1Endpoints.getSubsets()` without a null check. If the zookeeper service has 
no endpoints, `v1Endpoints` is null and `.getSubsets()` NPEs. The subsequent 
line 314 `if (Objects.isNull(subsets) || ...)` is too late.
   
   ## Location
   - 
`shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/reconciler/IngressReconciler.java:312-313`
   
   ## Impact
   A Dubbo/Sofa ingress referencing a zookeeper service that is not yet ready 
NPEs during reconcile, blocking route configuration.
   
   ## Suggested fix
   Add `if (Objects.isNull(v1Endpoints)) { ... throw/log ... }` before line 313.
   
   ## Related existing
   None.
   


-- 
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