File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1216,8 +1216,14 @@ func (proxier *Proxier) syncProxyRules() {
1216
1216
1217
1217
// If nodePort is specified, user should be able to use nodeIP:nodePort to reach the backend endpoints
1218
1218
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
+ }
1219
1225
hnsLoadBalancer , err := hns .getLoadBalancer (
1220
- hnsEndpoints ,
1226
+ nodePortEndpoints ,
1221
1227
loadBalancerFlags {localRoutedVIP : true },
1222
1228
sourceVip ,
1223
1229
"" ,
You can’t perform that action at this time.
0 commit comments