Merge pull request #2760 from aledbf/fix-nil

Fix ingress rule parsing error
This commit is contained in:
k8s-ci-robot 2018-07-10 06:29:25 -07:00 committed by GitHub
commit 2d5b3dbe74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -402,6 +402,11 @@ func (n *NGINXController) getBackendServers(ingresses []*extensions.Ingress) ([]
server.Hostname, ingKey)
}
if rule.HTTP == nil {
glog.V(3).Infof("Ingress %q does not contain any HTTP rule, using default backend", ingKey)
continue
}
for _, path := range rule.HTTP.Paths {
upsName := fmt.Sprintf("%v-%v-%v",
ing.Namespace,