Adding support for externalIP Services

This commit is contained in:
Frieder Paape 2017-05-09 16:23:40 +02:00
parent 4601775c18
commit 3694788ed5
2 changed files with 11 additions and 5 deletions

View file

@ -126,13 +126,16 @@ func NewIngressController(backend ingress.Controller) *GenericController {
}
if len(svc.Status.LoadBalancer.Ingress) == 0 {
if len(svc.Spec.ExternalIPs) > 0 {
glog.Infof("service %v validated as assigned with externalIP", *publishSvc)
} else {
// We could poll here, but we instead just exit and rely on k8s to restart us
glog.Fatalf("service %s does not (yet) have ingress points", *publishSvc)
}
} else {
glog.Infof("service %v validated as source of Ingress status", *publishSvc)
}
}
if *watchNamespace != "" {
_, err = k8s.IsValidNamespace(kubeClient, *watchNamespace)

View file

@ -223,6 +223,9 @@ func (s *statusSync) runningAddresess() ([]string, error) {
addrs = append(addrs, ip.IP)
}
}
for _, ip := range svc.Spec.ExternalIPs {
addrs = append(addrs, ip)
}
return addrs, nil
}