-
Notifications
You must be signed in to change notification settings - Fork 16.9k
[stable/mongodb-replicaset]: use mongodb as port name to allow DNS seedlists #6843
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@k8s-ci-robot /check-cla |
Please bump the chart version |
81e52c3
to
593f5f1
Compare
@unguiculus done |
/ok-to-test |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrenarchy, unguiculus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…edlists (helm#6843) * [stable/mongodb-replicaset]: use mongodb as port name * [stable/mongodb-replicaset]: bump version to 3.5.4 Signed-off-by: Marek Bartik <mab@revolgy.com> Signed-off-by: Marek Bartik <bartimar6@gmail.com>
…edlists (helm#6843) * [stable/mongodb-replicaset]: use mongodb as port name * [stable/mongodb-replicaset]: bump version to 3.5.4 Signed-off-by: aba182 <ajwilhel@gmail.com>
…edlists (helm#6843) * [stable/mongodb-replicaset]: use mongodb as port name * [stable/mongodb-replicaset]: bump version to 3.5.4 Signed-off-by: aba182 <ajwilhel@gmail.com>
…edlists (helm#6843) * [stable/mongodb-replicaset]: use mongodb as port name * [stable/mongodb-replicaset]: bump version to 3.5.4 Signed-off-by: Jakob Niggel <info@jakobniggel.de>
What this PR does / why we need it:
By changing the service's port name to
mongodb
, Kubernetes automatically creates SRV DNS records under_mongodb._tcp.my-mongo-service.namespace.svc.cluster.local
that point to the running instances (including the port for each instance). This is exactly what MongoDB clients support in the DNS Seedlist Connection Format. The benefit is that for replica sets you can use a connection URI likemongodb+srv://my-mongo-service.namespace.svc.cluster.local/?replicaSet=my-rs
that has a single host name. Otherwise you have to construct a URI with all hostnames of the replica set which is a bit tedious.Special notes for your reviewer:
This only looks like a cosmetic change but the name
mongodb
is expected by MongoDB clients, see https://docs.mongodb.com/manual/reference/connection-string/#dns-seedlist-connection-format.peer
was arbitrary I assume so it shouldn't affect anything. I also tested it and it works fine.ping @foxish @unguiculus