private List<DivideUpstream> getUpstreamFromEndpoints(final V1Endpoints v1Endpoints) {
        List<DivideUpstream> res = new ArrayList<>();
        List<V1EndpointSubset> subsets = v1Endpoints.getSubsets();
        if (CollectionUtils.isNotEmpty(subsets)) {
            for (V1EndpointSubset subset : subsets) {
                List<CoreV1EndpointPort> ports = subset.getPorts();
                List<V1EndpointAddress> addresses = subset.getAddresses();
                if (CollectionUtils.isEmpty(ports) || CollectionUtils.isEmpty(addresses)) {
                    continue;
                }
                CoreV1EndpointPort endpointPort = ports.stream()
                        .filter(coreV1EndpointPort -> "TCP".equals(coreV1EndpointPort.getProtocol()))
                        .findFirst()
                        .orElseThrow(() -> new ShenyuException("Can't find port from endpoints"));
                String port = null;
                if (endpointPort.getPort() > 0) {
                    port = String.valueOf(endpointPort.getPort());
                } else {
                    String endpointPortName = endpointPort.getName();
                    if (Objects.nonNull(endpointPortName)) {
                        port = endpointPortName;
                    }
                }
                for (V1EndpointAddress address : addresses) {
                    String ip = address.getIp();
                    if (Objects.nonNull(ip)) {
                        DivideUpstream upstream = new DivideUpstream();
                        upstream.setUpstreamUrl(ip + ":" + port);
                        upstream.setWeight(100);
                        // TODO support config protocol in annotation
                        upstream.setProtocol("http://");
                        upstream.setWarmup(0);
                        upstream.setStatus(true);
                        upstream.setUpstreamHost("");
                        res.add(upstream);
                    }
                }
            }
        }
        return res;
    }
Reconcile cycle.

@param request request
@return reconcile result
shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/reconciler/EndpointsReconciler.java