Skip to content

Commit e87e4be

Browse files
committed
Fix HTTP readiness/liveness probes for local node
1 parent 02ee242 commit e87e4be

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
@@ -1216,8 +1216,14 @@ func (proxier *Proxier) syncProxyRules() {
12161216

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

0 commit comments

Comments
 (0)