@@ -1076,6 +1076,7 @@ func (proxier *Proxier) syncProxyRules() {
1076
1076
klog .V (4 ).Infof ("====Applying Policy for %s====" , svcName )
1077
1077
// Create Remote endpoints for every endpoint, corresponding to the service
1078
1078
containsPublicIP := false
1079
+ containsNodeIP := false
1079
1080
1080
1081
for _ , ep := range proxier .endpointsMap [svcName ] {
1081
1082
var newHnsEndpoint * endpointsInfo
@@ -1126,13 +1127,15 @@ func (proxier *Proxier) syncProxyRules() {
1126
1127
}
1127
1128
if ep .ip == rs .providerAddress {
1128
1129
providerAddress = rs .providerAddress
1130
+ containsNodeIP = true
1129
1131
}
1130
1132
}
1131
1133
if len (providerAddress ) == 0 {
1132
- klog .Errorf ("Could not find provider address for %s" , ep .ip )
1134
+ klog .Infof ("Could not find provider address for %s. Assuming it is a public IP " , ep .ip )
1133
1135
providerAddress = proxier .nodeIP .String ()
1134
1136
containsPublicIP = true
1135
1137
}
1138
+
1136
1139
hnsEndpoint := & endpointsInfo {
1137
1140
ip : ep .ip ,
1138
1141
isLocal : false ,
@@ -1186,7 +1189,7 @@ func (proxier *Proxier) syncProxyRules() {
1186
1189
klog .V (4 ).Infof ("Trying to Apply Policies for service %s" , spew .Sdump (svcInfo ))
1187
1190
var hnsLoadBalancer * loadBalancerInfo
1188
1191
var sourceVip = proxier .sourceVip
1189
- if containsPublicIP {
1192
+ if containsPublicIP || containsNodeIP {
1190
1193
sourceVip = proxier .nodeIP .String ()
1191
1194
}
1192
1195
hnsLoadBalancer , err := hns .getLoadBalancer (
0 commit comments