Using CloudNativePG/ssl database for the convex backend
After a lot of banging my head, and some unexplainable errors, I've got it to work 🥳
10 Replies
I'll put details here
Now, what I am going to show is pulumi config, but it is pretty much 1-1 with normal kubernetes yaml.
So, I've got just your standard cloudnativepg cluster, no special certificates or anything, we can just use the ca secret that the cnpg operator creates:

This of course can be any database with ssl, as long as you can extract or have control over the ca.crt file
I then use the clustersecret (https://clustersecret.com/) operator to copy the generated ca secret into other namespaces on the cluster

Then on the convex deployment, I define a new volume that is populated from that public secret:
and then mount the volume to the backend container and set the
PG_CA_FILE
to point at the ca.crt
in the volume:
and then it just works? seems i misconfigured the PG_CA_FILE variable or didnt pass the correct CA cert
thanks a lot for the info
It just works
np, hope you get it working on your end!
and for the do_not_require_ssl variable do you leave it empty (or false) as in the codeblock or do you set it to true?
I just leave it as an empty string i.e. "use ssl"
alright thank you so much! i'll report back when i decide to tackle the issue again