-
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
Regression: Default certificate used if oldest ingress does not contain TLS secret #4926
Comments
@zeeZ this works as expected. Please check https://kubernetes.github.io/ingress-nginx/how-it-works/ |
You could easily add an "oldest eligible certificate/secret wins" rule, but if this is indeed expected behaviour supposed to stay this way I will have no choice but to migrate to another controller. |
The first rule is invalid, you should not have an ingress with a tls section without secretName. Without that, the ingress controller cannot configure SSL. The ingress controller cannot guess what is the intention here, that's why we cannot mix definitions from different ingresses.
This is the behavior since the inception of the controller and we have no plans to change it. |
But definitions from different ingresses are already mixed, for example with I don't see the need for the controller to guess. There is a valid secret defined for a host, albeit not the oldest one, but instead it uses the default certificate, which is invalid for that host. It's just a matter of choosing the default certificate after checking the first ingress vs after all configuration is merged.
Not for the 0.26 versions, but that was a bug then. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: 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. |
NGINX Ingress controller version: 0.27.0
What happened:
When the oldest Ingress that specifies a TLS host does not reference a secret, the default certificate is always served, even if another Ingress references a valid secret.
What you expected to happen:
If multiple Ingress specify a TLS host, but only one references a valid secret, the certificate from that secret should be used, not the default certificate
How to reproduce it:
create a tls secret "mysecret" with a valid certificate for "foo.bar.com"
create Ingress without secret reference
create Ingress with secret reference
check certificate returned
Anything else we need to know:
Applying steps 2 and 3 in reverse order will serve the correct certificate. Restart the controller after removing Ingresses when testing because certificates may linger.
See #2279 and #4563 which asked for this behaviour.
I suspect this was broken by #4816.
/kind bug
The text was updated successfully, but these errors were encountered: