@@ -1091,6 +1091,7 @@ func (proxier *Proxier) syncProxyRules() {
1091
1091
klog .V (4 ).Infof ("====Applying Policy for %s====" , svcName )
1092
1092
// Create Remote endpoints for every endpoint, corresponding to the service
1093
1093
containsPublicIP := false
1094
+ containsNodeIP := false
1094
1095
1095
1096
for _ , ep := range proxier .endpointsMap [svcName ] {
1096
1097
var newHnsEndpoint * endpointsInfo
@@ -1141,13 +1142,15 @@ func (proxier *Proxier) syncProxyRules() {
1141
1142
}
1142
1143
if ep .ip == rs .providerAddress {
1143
1144
providerAddress = rs .providerAddress
1145
+ containsNodeIP = true
1144
1146
}
1145
1147
}
1146
1148
if len (providerAddress ) == 0 {
1147
- klog .Errorf ("Could not find provider address for %s" , ep .ip )
1149
+ klog .Infof ("Could not find provider address for %s. Assuming it is a public IP " , ep .ip )
1148
1150
providerAddress = proxier .nodeIP .String ()
1149
1151
containsPublicIP = true
1150
1152
}
1153
+
1151
1154
hnsEndpoint := & endpointsInfo {
1152
1155
ip : ep .ip ,
1153
1156
isLocal : false ,
@@ -1201,7 +1204,7 @@ func (proxier *Proxier) syncProxyRules() {
1201
1204
klog .V (4 ).Infof ("Trying to Apply Policies for service %s" , spew .Sdump (svcInfo ))
1202
1205
var hnsLoadBalancer * loadBalancerInfo
1203
1206
var sourceVip = proxier .sourceVip
1204
- if containsPublicIP {
1207
+ if containsPublicIP || containsNodeIP {
1205
1208
sourceVip = proxier .nodeIP .String ()
1206
1209
}
1207
1210
hnsLoadBalancer , err := hns .getLoadBalancer (
0 commit comments