Hi, has anyone successfully used CockroachDB with ...
# ory-selfhosting
d
Hi, has anyone successfully used CockroachDB with Ory in Kubernetes ?
c
nope. but it's on my todo after getting pg working šŸ˜‰
l
we use CockroachDB but the Cockroach Labs version so we don't manage it ourselves
d
@curved-oxygen-35290 Getting pg to work was easy but we are stuck with CockroachDB, we couldn't get Ory to work with it.
c
strange it should be wire compatible
l
wire compatible != database migration compatible
you'll need to use
cockroach://
in your DSN to enable the CRDB sql driver
c
urgh
l
I believe much of the Ory Network uses CockroachDB as their database, so it has fairly good support
s
yes we are using crdb, and yeah the
cockroach://
scheme in the DSN is required, else some stuff does not work
but that should be all
s
@delightful-noon-48365 Self-hosted CRDB in K8s and Ory are fully compatible. Iā€˜m using this setup successfully in production.
d
Hello @steep-teacher-8664, we are not saying that it is not fully compatible but we could not get it to work. Is it possible to show how you configured it in your cluster?
s
Copy code
hydra:
  hydra:
    config:
       dsn: "<cockroach://hydra:[redacted]@cockroachdb.crdb.svc.cluster.local:26257/ory_hydra>"
Does this help you? šŸ˜… I am not sure where your problem is exactly? Please explain it further :)
d
Yes, this is exactly the same configuration we have, we just successfully connected to cockroachdb but now we want to make an InitContainer to create a database when Ory starts.
s
Copy code
hydra:
  automigration:
    enabled: true
    type: "initContainer"
What error are you getting, my friend? šŸ˜„
Troubleshooting is hard, if I don't know your situation or setup.
d
Sorry it's extraInitContainers : https://github.com/ory/k8s/blob/master/helm/charts/kratos/values.yaml#L372 based on @stocky-king-5626 reply on this issue ; https://github.com/ory/kratos/discussions/1111
s
But...what is the problem?
You said "you could not get ory with crdb to work" - now it is working. So what is the log error or whatever? Oo
d
We want to deploy a new DB as the same time we deploy our Ory, like DBaaS