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

Issue with multiple nginx-ingress controllers #17

Open
dhrp opened this issue Dec 22, 2021 · 2 comments
Open

Issue with multiple nginx-ingress controllers #17

dhrp opened this issue Dec 22, 2021 · 2 comments

Comments

@dhrp
Copy link

dhrp commented Dec 22, 2021

Summary:
When there are multiple ingress controllers; for example, one with proxy-protocol enabled, and one without proxy protocol enabled, the hairpin proxy will make rewrite rules for all. But this gives 404 issues for the non-proxied ingresses.

Steps to reproduce:

  • Make an ingress controller with proxy protocol. Name it "nginx-ingress-w-proxy-protocol"
  • Make an ingress controller without proxy protocol. Name it "nginx-ingress"
  • Install the hairpin proxy
  • Create some ingress on both
  • Try to reach a site from IN the cluster, that is served by the nginx ingress.
  • Find that it the site gives a 404 not found.
  • Check the rules written kubectl get configmap -n kube-system coredns -o=jsonpath='{.data.Corefile}'
  • Notice that ALSO the site that should not be proxy'd is proxied, and thus sent to the nginx-ingress-w-proxy-protocol ingress controller. -- But it does not know the site, and thus it fails. Ultimately cert-manager fails to renew the certificates.

Suggested fix
Include the ingress class in the polling of ingress resources.

**Now I'm writing this, I realize this may be because I'm still on K8S 1.18, and it doesn't support the new ingress definitions (supporting ingress classes). Will need to test.

@bernatvadell
Copy link

I know it's been a long time, did you find a solution? I'm stuck at this point.

bernatvadell added a commit to bernatvadell/hairpin-proxy that referenced this issue May 20, 2023
@dhrp
Copy link
Author

dhrp commented May 22, 2023

I think I ended up with a workaround: Switching which Ingress I was using for that particular service, to get to a compatible configuration.

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