provider-sql icon indicating copy to clipboard operation
provider-sql copied to clipboard

Autoselect DB Name for me

Open fuel-wlightning opened this issue 3 years ago • 2 comments

What problem are you facing?

I have a single application that I've deployed multiple times (multiple testing environments). In the application's manifests it requests a MySQL db (sort of like shared hosting of old). They all unfortunately request the same DB name. Now I have collisions!

Context

When I ask for a Pod on Kubernetes, I'm not expecting the underlying container name to match my pod name. The underlying container name is an implementation detail. If it did do that, then pod A in namespace A would collide with pod A in namespace B.

How could Crossplane help solve your problem?

When I ask crossplane for a SQL database, it can create one with my request name plus a random prefix (to ease debugging), ensuring it doesn't collide with an existing db. Then it would load the DB name into a config map for me to use with my application deployment.

fuel-wlightning avatar Mar 05 '21 23:03 fuel-wlightning