JooKS-me commented on code in PR #5054:
URL: https://github.com/apache/shenyu/pull/5054#discussion_r1305699096
##########
shenyu-kubernetes-controller/src/main/java/org/apache/shenyu/k8s/parser/DivideIngressParser.java:
##########
@@ -275,13 +275,17 @@ private String parsePort(final V1IngressServiceBackend
service) {
return null;
}
- private List<DivideUpstream> parseUpstream(final V1IngressBackend backend,
final String namespace) {
+ private List<DivideUpstream> parseUpstream(final V1IngressBackend backend,
final String namespace, final Map<String, String> annotations) {
List<DivideUpstream> upstreamList = new ArrayList<>();
if (Objects.nonNull(backend) && Objects.nonNull(backend.getService())
&& Objects.nonNull(backend.getService().getName())) {
String serviceName = backend.getService().getName();
// shenyu routes directly to the container
V1Endpoints v1Endpoints =
endpointsLister.namespace(namespace).get(serviceName);
List<V1EndpointSubset> subsets = v1Endpoints.getSubsets();
+ String[] protocol = null;
+ if (Objects.isNull(annotations) &&
annotations.containsKey(IngressConstants.UPSTREAMS_PROTOCOL_ANNOTATION_KEY)) {
Review Comment:
maybe isNonNull?
--
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]