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

Keep the previous certificate in the bundle as well as the new one to prevent periods of service outage #15

Closed
vassilvk opened this issue Jun 6, 2022 · 1 comment

Comments

@vassilvk
Copy link
Member

vassilvk commented Jun 6, 2022

@arkaitzj wrote:

During our tests we discovered that every time the certificates rotated we got a lot of TLS bad certificate errors in our cluster.
2022/06/02 13:46:25 http: TLS handshake error from 10.213.162.79:60186: remote error: tls: bad certificate

When we looked into it we discovered that the refresher sets the secret and the caBundle in the webhooks at the same time.
However, that does not account for the time it takes for a pod to get the secret updated and the operator to refresh the certificate.
During that period of time the control-plane is using the new caBundle and the operator the old one, failing all requests and provoking a service outage since none of the resources created at that time will be serviced by kubemod.

The proposed solution keeps the previous certificate in the bundle along with the new one, so that the operator can work well before and after swapping its own certificate.
This means there are always 2 certificates in the caBundle and each certificate will be valid for 2 cron periods, if this is a concern, halving the cron period should work.

@vassilvk
Copy link
Member Author

vassilvk commented Jun 6, 2022

Closed by #14

@vassilvk vassilvk closed this as completed Jun 6, 2022
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

1 participant