Headless Services: Adding option to specify None for PortalIP

This commit is contained in:
Abhishek Gupta
2015-03-16 14:36:30 -07:00
parent 7f02e110f4
commit b0c23c1046
16 changed files with 237 additions and 16 deletions

View File

@@ -468,6 +468,10 @@ func (proxier *Proxier) OnUpdate(services []api.Service) {
glog.V(4).Infof("Received update notice: %+v", services)
activeServices := make(map[types.NamespacedName]bool) // use a map as a set
for _, service := range services {
// if PortalIP is "None" or empty, skip proxying
if !api.IsServiceIPSet(&service) {
continue
}
serviceName := types.NamespacedName{service.Namespace, service.Name}
activeServices[serviceName] = true
info, exists := proxier.getServiceInfo(serviceName)