-
Notifications
You must be signed in to change notification settings - Fork 689
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
certs: Rotate certs in 1-year #1856
Comments
To start, it'd be really nice if the job could be re-run without breaking anything when one upgrades to a newer Contour version. We had to disable the job after the first apply because it won't succeed again. It'd be reasonable to assume that one upgrades Contour at least a couple times a year so that job could transparently rotate the certs. |
@youngnick could you please look into this. AFAIR this is is not the expected behaviour. |
So, there were actually two problems there:
@stevesloka has addressed these already in #2084. The certgen job will not rotate the certs at the moment, because it currently requires restarting all the Envoys and Contour to do it. It turns out that this is pretty tricky to resolve and requires a clean drain mechanism for Envoy (#145) as well as storing the full CA keypair inside the cluster, which needs to be done carefully to ensure it's not easily reachable. Right now the current rotation process if you're running Kubernetes 1.12+ is:
Kubernetes will delete the completed job with the newest spec after it finishes. There's also #2020 covering documenting this process properly as the first step towards automating it. |
What if we move the cert generation to the Contour serve process as a new workgroup item. It could generate certs automatically (which is already in the Contour binary) if certs do not exist in the current namespace. Something would need to be a flag to tell Contour to generate certs or not. Maybe an arg like It could also handle regenerating certs automatically before the 1-year window. Contour has support for automatically rotating certs thanks to #2198, but still needs work to allow Envoy to rotate its certs (#2143 (comment)).
|
If we do that, we are building a poor copy of cert-manager though. Adding this functionality into Contour is not necessary, there are other solutions for it, and, if you have clusters running for a year, you should be using something else. This should not be automated by Contour. |
Strongly seconded. |
Yup I don't disagree short of complexity with the other system getting it integrated. Ok to close this issue then? Or should this issue really be about the integration with certmanager to solve? |
I think between the changes @tsaarni has brought in and the doc updates you've already landed, this issue is actually redundant. |
Personally I think we should document how to rotate a cert generated by cert-gen. That might be "delete the certificate, job, secret, and pods" noting that there may be a brief outage. Then as future work, we document how to integrate contour into certs generate by vault or cert manager. |
@stevesloka has a PR #2282 already for the rotation docs.. |
I'm going to close this issue then. I think we have the other bits documented and called out in other PR's. |
We should have Contour rotate the certs generated automatically before they expire if users are using the provided job today to create gRCP secure communication between Envoy<>Contour.
The text was updated successfully, but these errors were encountered: