Skip to content

Commit

Permalink
Merge pull request #456 from freehan/bug-fx
Browse files Browse the repository at this point in the history
NEG controller bug fix
  • Loading branch information
k8s-ci-robot committed Aug 30, 2018
2 parents 29b03e7 + 5cb454e commit 2c3a698
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/neg/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,19 @@ func gatherIngressServiceKeys(obj interface{}) sets.String {
return set
}

if !utils.IsGCEIngress(ing) && !utils.IsGCEMultiClusterIngress(ing) {
glog.V(4).Infof("Ignoring ingress %v/%v based on annotation %v", ing.Namespace, ing.Name, annotations.IngressClassKey)
return set
}

if ing.Spec.Backend != nil {
set.Insert(serviceKeyFunc(ing.Namespace, ing.Spec.Backend.ServiceName))
}

for _, rule := range ing.Spec.Rules {
if rule.IngressRuleValue.HTTP == nil {
continue
}
for _, path := range rule.IngressRuleValue.HTTP.Paths {
set.Insert(serviceKeyFunc(ing.Namespace, path.Backend.ServiceName))
}
Expand Down

0 comments on commit 2c3a698

Please sign in to comment.