percona / roadmap

Public Percona Roadmaps
10 stars 1 forks source link

[K8SPSMDB-557] Allow user to change the port for MongoDB deployment #83

Open spron-in opened 1 year ago

spron-in commented 1 year ago

Community Note

Tell us about the feature

The user should be able to expose replicasets and mongos on other than default 27017 port.

It may be valuable from security standpoint or for ease of logically separating clusters.

 

Right now we have mongod.port variable, but it is not working properly for RS and throws the following error if some other port is set: {code:java} {"level":"error","ts":1631183197.8572798,"logger":"controller_psmdb","msg":"failed to reconcile cluster","Request.Namespace":"default","Request.Name":"cr2","replset":"rs0","error":"handleReplsetInit: exec rs.initiate: command terminated with exit code 1 / Percona Server for MongoDB shell version v4.4.6-8\nconnecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb\nError: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :\nconnect@src/mongo/shell/mongo.js:374:17\n@(connect):2:6\nexception: connect failed\nexiting with code 1\n / ","errorVerbose":"exec rs.initiate: command terminated with exit code 1 / Percona Server for MongoDB shell version v4.4.6-8\nconnecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb\nError: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 {code}

Link to JIRA