Adding support for externalIP Services
This commit is contained in:
parent
4601775c18
commit
3694788ed5
2 changed files with 11 additions and 5 deletions
|
@ -126,13 +126,16 @@ func NewIngressController(backend ingress.Controller) *GenericController {
|
|||
}
|
||||
|
||||
if len(svc.Status.LoadBalancer.Ingress) == 0 {
|
||||
// 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)
|
||||
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)
|
||||
}
|
||||
|
||||
glog.Infof("service %v validated as source of Ingress status", *publishSvc)
|
||||
}
|
||||
|
||||
if *watchNamespace != "" {
|
||||
|
||||
_, err = k8s.IsValidNamespace(kubeClient, *watchNamespace)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue