Skip to content

Commit

Permalink
Added: Repository will now respect default backends, too.
Browse files Browse the repository at this point in the history
  • Loading branch information
blaubaer committed Nov 10, 2020
1 parent 38f03eb commit c04037d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions rules/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,19 @@ func (instance *repositoryImplState) visitIngress(ingress *v1beta1.Ingress, targ
return err
}

if v := ingress.Spec.Backend; v != nil {
if backend, err := instance.ingressToBackend(source, *v); err != nil {
return err
} else if options, err := instance.newOptionsBy(ingress); err != nil {
return err
} else if backend != nil {
r := NewRule("", []string{}, source, backend, options)
if err := target.Put(r); err != nil {
return err
}
}
}

for _, forHost := range ingress.Spec.Rules {
host := normalizeHostname(forHost.Host)
if forHost.IngressRuleValue.HTTP != nil && forHost.IngressRuleValue.HTTP.Paths != nil {
Expand Down

0 comments on commit c04037d

Please sign in to comment.