-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Ignore ingress definitions for other ingressclasses #7277
Comments
/triage accepted |
Thanks @liggitt I'll take a look into this. For my future me (or people helping) we need to:
|
/close Closed in #7341 |
@rikatz: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@rikatz Hello, I have a question on a potential bug of Ingress-Nginx. We have two ingress controllers, controller A (v1.2.0) and controller B (v 1.2.1), installed on a Kubernetes cluster(version: v1.22.9) Each controller has a different IngressClass: A and B. When I try to create an ingress of ingress class A, it failed with error "Error from server (InternalError): error when creating "ingress-test.yaml": Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": Post https://ingress-nginx-controller-admission.ingress-nginx.svc:443/extensions/v1/ingresses?timeout=30s: context deadline exceeded. The controller B complains "controller I0720 18:12:05.800513 7 store.go:425] "Ignoring ingress because of error while validating ingress class" ingress="ingress-test" error="no object matching key "A" in local store"". Ingress of IngressClass A is ignored because of validating error. If we have the fix, we shouldn't need to validate at all because of the IngressClass. Is this caused by an incomplete fix? Is this expected? |
NGINX Ingress controller version: v1.0.0-alpha.1
Kubernetes version (use
kubectl version
): v1.19+Environment: all
uname -a
): allWhat happened: ingress definitions created intended to be serviced by other ingress controllers are handled by ingress-nginx
Reviewing the code path ingress-nginx uses to fetch ingress objects, I don't see filtering of ingress objects targeting other ingress classes:
ingress-nginx/cmd/plugin/request/request.go
Lines 124 to 129 in 1feec89
ingress-nginx/cmd/plugin/commands/ingresses/ingresses.go
Lines 60 to 73 in 1feec89
ingress-nginx/cmd/plugin/commands/ingresses/ingresses.go
Lines 134 to 180 in 1feec89
That means that ingress-nginx can't coexist with another ingress controller partitioned by ingress class, which is part of Ingress v1.
/kind bug
The text was updated successfully, but these errors were encountered: