k8s_external can now resolve CNAME returned by AWS ELB/NLB (#3916)

Automatically submitted.
This commit is contained in:
Michael Kashin 2020-05-29 10:04:23 -07:00 committed by GitHub
parent 54fb2112ac
commit 2e3ef77731
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 72 additions and 17 deletions

View file

@ -62,7 +62,12 @@ func toService(skipCleanup bool, svc *api.Service) *Service {
li := copy(s.ExternalIPs, svc.Spec.ExternalIPs)
for i, lb := range svc.Status.LoadBalancer.Ingress {
s.ExternalIPs[li+i] = lb.IP
if lb.IP != "" {
s.ExternalIPs[li+i] = lb.IP
continue
}
s.ExternalIPs[li+i] = lb.Hostname
}
if !skipCleanup {