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 not working #301

Closed
pwillie opened this issue Feb 17, 2017 · 2 comments
Closed

Ingress class not working #301

pwillie opened this issue Feb 17, 2017 · 2 comments

Comments

@pwillie
Copy link
Contributor

pwillie commented Feb 17, 2017

Have been attempting to use --ingress-class on the Nginx controller to only pick up a select subset of the ingress resources provisioned in the cluster. What is happening is that all ingress resources are handled by the Nginx controller.

Nginx controller: gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.1
Kubernetes version: v1.5.1

Start controller with args: --ingress-class=xyz and --v=3

Create an ingress resource with annotation: kubernetes.io/ingress.class: "asdf"

The interesting parts of the ingress controller logs show:

I0217 20:45:57.731248       7 launch.go:92] &{NGINX 0.9.0-beta.1 git-910b706 https://github.com/bprashanth/ingress.git}
I0217 20:45:57.731319       7 launch.go:95] Watching for ingress class: xyz
I0217 20:45:57.731603       7 nginx.go:109] starting NGINX process...
I0217 20:47:05.794602       7 queue.go:59] queuing item &TypeMeta{Kind:,APIVersion:,}
I0217 20:47:05.800593       7 controller.go:167] ignoring add for ingress class-test based on annotation kubernetes.io/ingress.class
I0217 20:47:05.828321       7 queue.go:59] queuing item &TypeMeta{Kind:,APIVersion:,}
I0217 20:47:07.760524       7 controller.go:761] creating upstream default-class-test-80
I0217 20:47:07.760537       7 controller.go:797] obtaining port information for service default/class-test
I0217 20:47:07.760542       7 controller.go:952] getting endpoints for service default/class-test and port 80
I0217 20:47:07.760549       7 controller.go:1012] endpoints found: []
W0217 20:47:07.760558       7 controller.go:806] service default/class-test does not haveany active endpoints
I0217 20:47:07.762718       7 controller.go:654] replacing ingress rule default/class-test location / upstream default-class-test-80 (upstream-default-backend)
I0217 20:47:07.762746       7 controller.go:683] upstream default-class-test-80 does not have any active endpoints. Using default backend

And then goes on to show the diff of the nginx upstream and server blocks that is being added to the config.

I have verified that the ingress does indeed get configured even though the --ingress-class does not match.

I have attempted to follow the code but I cannot work out how the ignored ingress resource makes it into ingLister.Store.List()? Can anyone shed some light on what is going on?

@aledbf
Copy link
Member

aledbf commented Feb 17, 2017

@pwillie this issue is fixed in master. #272
Next version will include the fix

@pwillie
Copy link
Contributor Author

pwillie commented Feb 17, 2017

@aledbf great to hear. And thanks for the quick response.

@pwillie pwillie closed this as completed Feb 17, 2017
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

No branches or pull requests

2 participants