Refactor update of status removing initial check for loadbalancer
This commit is contained in:
parent
e82cb31275
commit
55051743fd
3 changed files with 15 additions and 37 deletions
|
|
@ -243,6 +243,11 @@ func (s *statusSync) runningAddresses() ([]string, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if svc.Spec.Type == apiv1.ServiceTypeExternalName {
|
||||
addrs = append(addrs, svc.Spec.ExternalName)
|
||||
return addrs, nil
|
||||
}
|
||||
|
||||
for _, ip := range svc.Status.LoadBalancer.Ingress {
|
||||
if ip.IP == "" {
|
||||
addrs = append(addrs, ip.Hostname)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue