Skip to content

Commit

Permalink
Merge pull request #236 from nicknovitski/patch-1
Browse files Browse the repository at this point in the history
Always respect `-ingress-class` option
  • Loading branch information
pleshakov authored Feb 9, 2018
2 parents 0dafb34 + cf2f370 commit a3a7ca4
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 a3a7ca4

Please sign in to comment.