From e87e4bea0fe8f11ccc74029863326f08e486e9dd Mon Sep 17 00:00:00 2001 From: Kalya Subramanian Date: Mon, 25 Nov 2019 10:20:09 -0800 Subject: [PATCH] Fix HTTP readiness/liveness probes for local node --- pkg/proxy/winkernel/proxier.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/proxy/winkernel/proxier.go b/pkg/proxy/winkernel/proxier.go index eb481a81e6b..5cc02a86ee6 100644 --- a/pkg/proxy/winkernel/proxier.go +++ b/pkg/proxy/winkernel/proxier.go @@ -1216,8 +1216,14 @@ func (proxier *Proxier) syncProxyRules() { // If nodePort is specified, user should be able to use nodeIP:nodePort to reach the backend endpoints if svcInfo.nodePort > 0 { + // If the preserve-destination service annotation is present, we will disable routing mesh for NodePort. + // This means that health services can use Node Port without falsely getting results from a different node. + nodePortEndpoints := hnsEndpoints + if svcInfo.preserveDIP { + nodePortEndpoints = hnsLocalEndpoints + } hnsLoadBalancer, err := hns.getLoadBalancer( - hnsEndpoints, + nodePortEndpoints, loadBalancerFlags{localRoutedVIP: true}, sourceVip, "",