Merge pull request #2760 from aledbf/fix-nil
Fix ingress rule parsing error
This commit is contained in:
commit
2d5b3dbe74
1 changed files with 5 additions and 0 deletions
|
@ -402,6 +402,11 @@ func (n *NGINXController) getBackendServers(ingresses []*extensions.Ingress) ([]
|
||||||
server.Hostname, ingKey)
|
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 {
|
for _, path := range rule.HTTP.Paths {
|
||||||
upsName := fmt.Sprintf("%v-%v-%v",
|
upsName := fmt.Sprintf("%v-%v-%v",
|
||||||
ing.Namespace,
|
ing.Namespace,
|
||||||
|
|
Loading…
Reference in a new issue