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 @@ -1218,8 +1218,14 @@ func (proxier *Proxier) syncProxyRules() {
1218
1218
1219
1219
// If nodePort is specified, user should be able to use nodeIP:nodePort to reach the backend endpoints
1220
1220
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
+ }
1221
1227
hnsLoadBalancer , err := hns .getLoadBalancer (
1222
- hnsEndpoints ,
1228
+ nodePortEndpoints ,
1223
1229
loadBalancerFlags {localRoutedVIP : true },
1224
1230
sourceVip ,
1225
1231
"" ,
You can’t perform that action at this time.
0 commit comments