Skip to content

Commit

Permalink
Always respect -ingress-class option
Browse files Browse the repository at this point in the history
  • Loading branch information
nicknovitski authored Feb 9, 2018
1 parent 0dafb34 commit cf2f370
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions nginx-controller/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import (

const (
ingressClassKey = "kubernetes.io/ingress.class"
nginxIngressClass = "nginx"
)

// LoadBalancerController watches Kubernetes API and
Expand Down Expand Up @@ -1046,13 +1045,10 @@ func (lbc *LoadBalancerController) isNginxIngress(ing *extensions.Ingress) bool
if lbc.useIngressClassOnly {
return class == lbc.ingressClass
}
return class == nginxIngressClass || class == ""
return class == lbc.ingressClass || class == ""
} else {
if lbc.useIngressClassOnly {
return false
}
return ! lbc.useIngressClassOnly
}
return true
}

// ValidateSecret validates that the secret follows the TLS Secret format.
Expand Down

0 comments on commit cf2f370

Please sign in to comment.