Skip to content

Commit

Permalink
Fix issue when operate Single Service Ingress backend
Browse files Browse the repository at this point in the history
Signed-off-by: Tang Le <tangle3@wanda.cn>
  • Loading branch information
tangle329 authored and pleshakov committed Dec 1, 2016
1 parent 63321b3 commit 0199908
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nginx-controller/controller/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ func (s *StoreToIngressLister) GetServiceIngress(svc *api.Service) (ings []exten
if ing.Namespace != svc.Namespace {
continue
}
if ing.Spec.Backend != nil {
if ing.Spec.Backend.ServiceName == svc.Name {
ings = append(ings, ing)
}
}
for _, rules := range ing.Spec.Rules {
if rules.IngressRuleValue.HTTP == nil {
continue
Expand Down
5 changes: 5 additions & 0 deletions nginx-plus-controller/controller/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ func (s *StoreToIngressLister) GetServiceIngress(svc *api.Service) (ings []exten
if ing.Namespace != svc.Namespace {
continue
}
if ing.Spec.Backend != nil {
if ing.Spec.Backend.ServiceName == svc.Name {
ings = append(ings, ing)
}
}
for _, rules := range ing.Spec.Rules {
if rules.IngressRuleValue.HTTP == nil {
continue
Expand Down

0 comments on commit 0199908

Please sign in to comment.