Replication connection string

One feature I like from the MongoDB Community Operator is that after deploying the cluster it create a secret will connection string on it. Then I can use it on my deployment. Could the v1.13 implement this kind of feature ? As for now I must create it by hand and it’s painful :slight_smile:

1 Like

Nice idea! @spronin what do you think?

1 Like

Looks like a good idea. So it is just a separate secret with a URI?
@Jean-Baptiste_PIN could you please share an example of a secret and its contents?

1 Like

Sure here is the content of the secret generated by the operator after the replicatset deployment. What’s cool is he know all hosts based on the size of the RS.

connectionString.standard: mongodb://default-user:qk0EiE6nQBAnor48G0Uk2RM2%2F%2Bl1D6RJZA8zLR4G@mongodb-rs-0.mongodb-svc.default.svc.cluster.local:27017,mongodb-rs-1.mongodb-svc.default.svc.cluster.local:27017,mongodb-rs-2.mongodb-svc.default.svc.cluster.local:27017/admin?ssl=false
connectionString.standardSrv: mongodb+srv://default-user:qk0EiE6nQBAnor48G0Uk2RM2%2F%2Bl1D6RJZA8zLR4G@mongodb-svc.default.svc.cluster.local/admin?ssl=false
password: qk0EiE6nQBAnor48G0Uk2RM2/+l1D6RJZA8zLR4G
username: default-user
2 Likes