From a3c8e37806a9c908d76c8c5867fe605e587b158a Mon Sep 17 00:00:00 2001 From: Sravanth Bangari Date: Mon, 10 Jun 2019 17:18:57 -0700 Subject: [PATCH] Fix the creation of load balancer policy for the NodeIp when NodePort specified is same as service Port --- pkg/proxy/winkernel/hnsV1.go | 2 ++ pkg/proxy/winkernel/hnsV2.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkg/proxy/winkernel/hnsV1.go b/pkg/proxy/winkernel/hnsV1.go index 571d51c563..ed3545ea30 100644 --- a/pkg/proxy/winkernel/hnsV1.go +++ b/pkg/proxy/winkernel/hnsV1.go @@ -172,6 +172,8 @@ func (hns hnsV1) getLoadBalancer(endpoints []endpointsInfo, flags loadBalancerFl if len(elbPolicy.VIPs) == 0 || elbPolicy.VIPs[0] != vip { continue } + } else if len(elbPolicy.VIPs) != 0 { + continue } LogJson(plist, "Found existing Hns loadbalancer policy resource", 1) return &loadBalancerInfo{ diff --git a/pkg/proxy/winkernel/hnsV2.go b/pkg/proxy/winkernel/hnsV2.go index e9684eee4e..fbfbecf2c4 100644 --- a/pkg/proxy/winkernel/hnsV2.go +++ b/pkg/proxy/winkernel/hnsV2.go @@ -186,6 +186,8 @@ func (hns hnsV2) getLoadBalancer(endpoints []endpointsInfo, flags loadBalancerFl if len(plist.FrontendVIPs) == 0 || plist.FrontendVIPs[0] != vip { continue } + } else if len(plist.FrontendVIPs) != 0 { + continue } LogJson(plist, "Found existing Hns loadbalancer policy resource", 1) return &loadBalancerInfo{