Hello team I m deploying SpiceDb
# spicedb
c
Hello team, I'm deploying SpiceDb Operator to K8s. Using postgres as my datastore engine. Is there a way to automate postgres migrations? I cant seem to find documentation. Any help is greatly appreciated! Thanks
v
Hey @claraisrael 👋 The operator should handle migrations automatically for you!
as soon as you change the target version, the operator knows it should run
migrate
command before spinning up the new version. It even knows when there are "phased migrations" that involve multiple steps
c
The operators runs the migrate head command automatically ?
v
yup!
c
Ahh. When I tested out my postgres connection (w Tableplus) , the tables weren't populated
v
weird, that should definitely not be the case
how did you use the operator? Did you create a
SpiceDBCluster
custom resource with postgres configured, and did it bring up the SpiceDB deployment?
c
Yep I followed those.
v
interesting, that's definitely not expected. If the operator spins up a cluster, the first thing it does is run migrate, and it that does not succeed, it will set the status field of the
SpiceDBCluster
with the problem identified
c
I pointed to the correct postgres DB with the flags datastore uri and engine
v
and did you see any status in the CR?
if no tables showed up, it's possible something was misconfigured
c
Ok. Let me look more into it! I'll ping you if I fix it or if I get stuck. Thanks!
v
yeah when you use the operator, always have a look at the status field of the
SpiceDBCluster
CR, it should point you to what's wrong
c
Fixed! Thanks
2 Views