Skip to content

Commit 1c5b6cb

Browse files
authored
Merge pull request kubernetes#85611 from ksubrmnn/routing_mesh
Fix HTTP readiness/liveness probes using NodePort
2 parents cec566d + e87e4be commit 1c5b6cb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/proxy/winkernel/proxier.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,8 +1218,14 @@ func (proxier *Proxier) syncProxyRules() {
12181218

12191219
// If nodePort is specified, user should be able to use nodeIP:nodePort to reach the backend endpoints
12201220
if svcInfo.nodePort > 0 {
1221+
// If the preserve-destination service annotation is present, we will disable routing mesh for NodePort.
1222+
// This means that health services can use Node Port without falsely getting results from a different node.
1223+
nodePortEndpoints := hnsEndpoints
1224+
if svcInfo.preserveDIP {
1225+
nodePortEndpoints = hnsLocalEndpoints
1226+
}
12211227
hnsLoadBalancer, err := hns.getLoadBalancer(
1222-
hnsEndpoints,
1228+
nodePortEndpoints,
12231229
loadBalancerFlags{localRoutedVIP: true},
12241230
sourceVip,
12251231
"",

0 commit comments

Comments
 (0)