Replies: 2 comments 4 replies
-
Hmm. I see the point. I just learned that Kubernetes has its own PKI, but that does not automatically approve CSRs. So theoretically you could overwrite the secret that is generated with the CA cert/key combination. I don't know if it is easily possible, but you could try to patch the deployment resource in a way to overwrite the required secret that mounts the certificate. That way, you can generate the certificate with the cert manager and then mount it into the operator. But this is a good idea that we create a configuration for this. I assume there are others that would use "real" certificates. |
Beta Was this translation helpful? Give feedback.
-
That seems like a documentation error to me. If you use the auto-generated operator definition, there is an init container which pulls down cfssl and generates a set of certificates for the webhook to use. |
Beta Was this translation helpful? Give feedback.
-
The documentation for webhooks advises to just add the generated files
ca.pem
andca-key.pem
to the repository of your operator, and (implicitly) to add them to your GitOps repository together with the kustomize script that generates a secret out of them. I understand that it is no security in this case, as the CA is only used cluster-internally, but it is still somehow an anti pattern.In our cluster infrastructure, we have the cert manager available. Do you have any hints how to generate the CA + key using cert manager using the custom resource "Certificate" of cert manager? Did somebody already try this and maybe even have a sample resource? What are things to keep an eye on?
Beta Was this translation helpful? Give feedback.
All reactions