Merge pull request #5409 from rvillablanca/fix/wrong-error-handling

Removed wrong code
This commit is contained in:
Kubernetes Prow Robot 2020-04-20 14:25:40 -07:00 committed by GitHub
commit 2a7c19ca8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -198,10 +198,6 @@ func (n *NGINXController) syncIngress(interface{}) error {
// CheckIngress returns an error in case the provided ingress, when added // CheckIngress returns an error in case the provided ingress, when added
// to the current configuration, generates an invalid configuration // to the current configuration, generates an invalid configuration
func (n *NGINXController) CheckIngress(ing *networking.Ingress) error { func (n *NGINXController) CheckIngress(ing *networking.Ingress) error {
//TODO: this is wrong
if n == nil {
return fmt.Errorf("cannot check ingress on a nil ingress controller")
}
if ing == nil { if ing == nil {
// no ingress to add, no state change // no ingress to add, no state change