Handle service's clusterIP for all services.

stackube-proxy has already handled clusterIP for ClusterIP typed
service, this PR adds handling for other typed services. This could
make clusterIP working for all services.

Change-Id: Ic728be02301bf8befe98b5b92861f865c6bf8f15
Closes-Bug: 1710840
Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
This commit is contained in:
Pengfei Ni 2017-08-18 15:30:46 +08:00
parent ca41a68e0b
commit d5e5b0765f
1 changed files with 4 additions and 4 deletions

View File

@ -552,11 +552,11 @@ func (p *Proxier) syncProxyRules() {
svcNameString := svcInfo.serviceNameString
// Step 5.1: check service type.
// Only ClusterIP service is supported. NodePort service is not supported since networks are L2 isolated.
// LoadBalancer service is handled in service controller.
// Only ClusterIP service is supported. We also handles clusterIP for other typed services, but note that:
// - NodePort service is not supported since networks are L2 isolated.
// - LoadBalancer service is handled in service controller.
if svcInfo.serviceType != v1.ServiceTypeClusterIP {
glog.V(3).Infof("Only ClusterIP service is supported, omitting service %q", svcName.NamespacedName)
continue
glog.V(3).Infof("Only service's clusterIP is handled here, omitting other fields of service %q (type=%q)", svcName.NamespacedName, svcInfo.serviceType)
}
// Step 5.2: check endpoints.