-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
panic if tls: bad certificate #45
Comments
To add to this @estahn, you're along the right lines with I've not had a chance to investigate further, but thought I'd mention this. |
@adamstrawson Have you seen this issue come up after applying this fix (estahn/charts@25cb0ca)? |
We just faced the same issue yesterday, turned out the certificate had wrong dns names (subjet alternative names) what did not match the webhook url (we use cert manager btw). |
Seeing the same issue: image-swapper running on AWS spot instances, which caused it to be rescheduled on a new node during spot instance shutdown. Bummer, as we use k8s-image-swapper to protect us from this exact scenario, but ATM we cannot be certain that image swapper is running correctly. Since the pod is still running, our monitoring will also not report any issues. |
On further investigation, I believe in our case this is actually an issue with reloading a new cert-manager certificate:
|
@Jasper-Ben Thanks for investigating this. We could possibly use https://github.com/dyson/certman to circumvent this issue. If you have time to contribute that would be amazing, otherwise, I will see if I can squeeze this in ASAP. |
👋 @estahn,
I had a look at certman. There is an open issue, which seems relevant to this use-case: dyson/certman#2 Might be easier to go the "Kubernetes way" of just panicking, thus triggering a pod recreation? Or to put it this way: IMO the "panic on TLS error" (as this ticket describes) should happen in any case, to catch any odd misbehavior. If we, in addition, want to be fancy about certificate rotation then we could look into some reload logic.
I might be able to take a look at it, but can't promise anything right now (busy schedule, you know how it is). If I manage, I'll let you know, otherwise feel free if you find the time 🙂 |
@Jasper-Ben Fair enough. This is related and can probably used as guidance: |
FWIW, it might be easier for you to use https://github.com/stakater/Reloader, that can trigger a pod restart when the secret behind the cert changes. |
On the first run, it sometimes shows up with this. This should cause panic and restart of the process so it can pick up the certificate. I assume a race condition with the helm hook. Need to investigate.
The text was updated successfully, but these errors were encountered: