-
Notifications
You must be signed in to change notification settings - Fork 306
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
Emit event on TLS errors #112
Conversation
Fixes #41 |
I was actually holding off on this fix because of the PR #106 will allow us to just return an error. Then we can raise the event at a high level in a single location. |
Ah that makes sense, I didn't look close to that PR. Closing this. |
Will reopen and modify this to simply return error after #106. |
/reopen |
@nicksardo I just realize |
The only consumer of |
Oops, I forgot to rebase hence looking at the old codes. Will do! |
c8efe4f
to
8299794
Compare
8299794
to
d2559d2
Compare
Updated commit, PTAL thanks! |
/lgtm |
Tested locally, didn't see error event being emitted. Seems like taskqueue only logs the error:
|
😬this change has broken both cert-manager and kube-lego with the GCLB: cert-manager/cert-manager#606 We currently rely on the fact that all current ingress controllers will still serve endpoints without TLS (or using a dummy, self signed certtificate) if the provided secretName does not exist. I am not casting a judgement as to how controllers should behave (this is already a very well discussed topic!), but it's really unfortunate to see another divergence in how the various ingress controllers behave (for some context, this has made developing an effective multi-ingress controller solution for validating HTTP01 acme challenges a nightmare since kube-lego began, and even now with cert-manager). Is there anything that can be done here? Ideally bringing the behaviour of both nginx and gce together, with minimal disruption to end-users. /cc @aledbf |
I'd also argue that the change in behaviour (going from a permissive policy of handling the missing secret, to a hard fail) is a change that should be considered 'breaking'. Would it be possible to alter this to instead only emit an event, and not actually fail/return error on the codepath? |
Is it not possible for kube-lego/cert-manager to not configure TLS until after the secret has been provisioned (i.e. challenge succeeded)? That seems to match the intent more closely. |
Neither cert-manager nor kube-lego actually set this field. In order to
determine where the secret should be stored for an ingress, we read the
secretName field from the Ingress resource and once validation is complete,
create a secret which is then picked up by the ingress controller.
This means the 'auto tls' (ie annotate your ingress and get a valid cert)
isn't possible without the old behaviour.
For cert-manager, this is slightly better as a user can opt to manually
create a Certificate resource to indicate where the resulting keypair
should be signed, but the majority of users prefer this step to be
automatic by just annotating their ingress.
Whilst I understand the assumption on behaviour here may not be ideal, this
is how controllers have operated for a very long time now (since their
inception, as evidenced by kube-lego) and imo switching this from a 'soft'
warning to a 'hard' fail is a regression/backwards incompatible change.
Thanks very much for the quick response 😄
…On Wed, 6 Jun 2018 at 01:13, Bowei Du ***@***.***> wrote:
Is it not possible for kube-lego/cert-manager to not configure TLS until
after the secret has been provisioned (i.e. challenge succeeded)? That
seems to match the intent more closely.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#112 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMbPx8FLe9tC1E0UuHHa4aNj3H00DP9ks5t5x6ygaJpZM4Ro4PS>
.
|
Bump. Any updates here? |
Given that ingress now supports multiple tls secrets/certificates, if we went back to a 'soft' warning, would we need to handle multiple non-existent tls secrets down the line? |
We're having the same issue on GKE cluster at 1.10.4-gke.2 the generation of a self signed temporary the certificate above works but is far from ideal. |
I've opened #388 to attempt to address the issues described above. |
Would be possible for the cert-manager to detect this and generate a self-signed cert to unblock creation of the Ingress and then do the update to final cert from let's encrypt. I think this is the behavior of ingress-nginx (self-signed cert) It feels wrong to proceed with the LB configuration in a situation when the configuration is not valid. |
From kubernetes/kubernetes#58643, found that no event is emitted when glbc fails to retrieve TLS cert. It might be helpful to make this visible to users.
/assign @nicksardo