
PostgreSQL across clouds and on-premises with Crossplane and Rook - melsmo
https://blog.crossplane.io/postgresql-crossplane-rook/
======
wmf
When a developer requests a Postgres database it may substitute CochroachDB
without warning? Sketchy. They could at least use Stolon or something.

~~~
jbw976
The intent is that the app dev only cares about getting a database that speaks
postgres on the wire (which CockroachDB does). The administrator, via a
ResourceClass, gets to specify the actual infrastructure that gets deployed to
fulfill that need for postgres. That could be Cloud SQL, or RDS, or even
CockroachDB. To the app dev that just needs postgres, those are all the same.
Crossplane is already doing similar "dynamic provisioning" for MySQL,
Kubernetes clusters, object storage buckets and with more to come like key
value stores, message queues, caches, etc.

This is very similar to how a StorageClass is used when a pod asks for a
volume. The admin specifies if that's a Google PersistentDisk or Amazon EBS or
Ceph RBD, etc. The pod doesn't have to care, it just gets its request for a
volume fulfilled.

I'll have to look more into Stolon, that could be interesting here, thanks for
that pointer.

(source: i'm a maintainer on both crossplane and rook)

~~~
wmf
AFAIK "speaks postgres on the wire" is far from the same as being fully
compatible.

~~~
jbw976
This article on their blog gets into the compatibility that cockroachdb offers
and why they even decided to do that in the first place:
[https://www.cockroachlabs.com/blog/why-
postgres/](https://www.cockroachlabs.com/blog/why-postgres/)

It's also very useful to be portable across many cloud providers (in addition
to on-premises), which is what crossplane is providing for your apps. In terms
of databases, Amazon RDS, Google Cloud SQL, and Azure PostgreSQL are all
abstracted away from the developer so that their application should work
across those without changes as well.

