Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ingress.class enhancement for debugging. #647

Closed
snoby opened this issue Apr 25, 2017 · 1 comment · Fixed by #662
Closed

ingress.class enhancement for debugging. #647

snoby opened this issue Apr 25, 2017 · 1 comment · Fixed by #662

Comments

@snoby
Copy link

snoby commented Apr 25, 2017

This is a suggestion for improvement. I spent some time debugging why when running an ingress with the ingress.class annotation for class set, why my ingresses were not being added to my ingress controller. Receiving this error message in the logs:

7 controller.go:168] ignoring add for ingress echomap based on annotation kubernetes.io/ingress.class

didn't help because it didn't tell me what the ingress controller was actually seeing in the annotation. As it turns out my problem was because the ingress had an annotation of:
ingress. kubernetes.io/ingress.class: "internal"
instead of
kubernetes.io/ingress.class: "internal"

I would recommend that the isValid function print what it sees as the annotion:

 ingEventHandler := cache.ResourceEventHandlerFuncs{
        AddFunc: func(obj interface{}) {
            addIng := obj.(*extensions.Ingress)
            if !class.IsValid(addIng, ic.cfg.IngressClass, ic.cfg.DefaultIngressClass) {
                glog.Infof("ignoring add for ingress %v based on annotation %v", addIng.Name, class.IngressKey)
                return
            }

because right now the class.IngressKey just prints kubernetes.io/ingress.class

@aledbf
Copy link
Member

aledbf commented Apr 25, 2017

didn't help because it didn't tell me what the ingress controller was actually seeing in the annotation. As it turns out my problem was because the ingress had an annotation of:

Good point. Added for next beta

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants