cockroachdb / cockroach-operator

k8s operator for CRDB
Apache License 2.0
281 stars 93 forks source link

Support database and user creation through Crdb kind #833

Closed synchris closed 2 years ago

synchris commented 2 years ago

Support to create through declarative Crdb, as most operators support this kind of operations, is a good start for the cockroach operator to support similar actions.

goshlanguage commented 2 years ago

I believe this is covered in #616 Would you agree?

lazedo commented 2 years ago

@goshlanguage create user should create secret if requested, so it can be used by other deployments. also, we should be able to create user in one namespace and reference a cockroach instance in another namespace to support multiple deployments in multiple different namespaces that use the same cockroach instance .

hendrikheil commented 2 years ago

It would be amazing if there was a CRD for users and databases, not just for production environments but especially for developers. There is currently no way to spin up a configured environment with tools like devspace for example. Having the option to just apply a manifest and accessing the credentials for a user through secrets would be insanely helpful.

pseudomuto commented 2 years ago

Roughly a duplicate of #814

hendrikheil commented 2 years ago

Not sure if this is actually a duplicate. I think the distinction between #814 and this would be mainly related to the time of creation. While #814 aims to define (a) database(s) at creation time, support through specific CRDs or even by defining them in the CRDB kind could allow for declarative changes after a cluster has been created. I assume most people probably are mostly looking for any sort of way to create a DB and a user at all, but I could see CRDs being much more useful for more complex use-cases.

nick4fake commented 1 year ago

Yeah, @pseudomuto it is different. We want to create users DBs AFTER cluster is initialized, which is typically done with CRDs