kubewarden-controller
kubewarden-controller copied to clipboard
Handle certificate rotation
Right now the controller creates a CA and, with this CA, creates the PEM certificate used by the policy-server.
The Kubernetes API server relies on this CA to verify the identity of the PolicyServer.
We have to:
- Automatically rotate the certificate used by the policy-server. Right now it expires after 1 year.
- Automatically renew the CA, this one expires after 10 years (?)
Worth a look, something we could leverage: https://github.com/open-policy-agent/cert-controller
I always wonder why every project (like kucero for CaaSP) has to re-implement certificate handling. This should be built into Kubernetes.
Worth a look, something we could leverage: https://github.com/open-policy-agent/cert-controller
We decided not to leverage https://github.com/open-policy-agent/cert-controller since it does not support zero-downtime CA rotation. Also, we will need to fork it to adapt it to our use case, as we configure policy webhooks dynamically. Finally, it does not fully support leader election due to this bug.