diff --git a/controllers/gce/controller/controller.go b/controllers/gce/controller/controller.go index 38309a34e..051ec9086 100644 --- a/controllers/gce/controller/controller.go +++ b/controllers/gce/controller/controller.go @@ -423,11 +423,19 @@ func (lbc *LoadBalancerController) ListRuntimeInfo() (lbs []*loadbalancers.L7Run glog.Warningf("Cannot get key for Ingress %v/%v: %v", ing.Namespace, ing.Name, err) continue } - tls, err := lbc.tlsLoader.load(&ing) - if err != nil { - glog.Warningf("Cannot get certs for Ingress %v/%v: %v", ing.Namespace, ing.Name, err) - } + + var tls *loadbalancers.TLSCerts + annotations := ingAnnotations(ing.ObjectMeta.Annotations) + // Load the TLS cert from the API Spec if it is not specified in the annotation. + // TODO: enforce this with validation. + if annotations.useNamedTLS() == "" { + tls, err = lbc.tlsLoader.load(&ing) + if err != nil { + glog.Warningf("Cannot get certs for Ingress %v/%v: %v", ing.Namespace, ing.Name, err) + } + } + lbs = append(lbs, &loadbalancers.L7RuntimeInfo{ Name: k, TLS: tls,