Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/mongodb-replicaset]: use mongodb as port name to allow DNS seedlists #6843

Merged
merged 2 commits into from
Aug 15, 2018

Conversation

andrenarchy
Copy link
Contributor

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 like mongodb+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

@k8s-ci-robot
Copy link
Contributor

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 k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 26, 2018
@andrenarchy andrenarchy changed the title [stable/mongodb-replicaset]: use mongodb as port name [stable/mongodb-replicaset]: use mongodb as port name to allow DNS seedlists Jul 26, 2018
@andrenarchy
Copy link
Contributor Author

@k8s-ci-robot /check-cla

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 27, 2018
@unguiculus
Copy link
Member

Please bump the chart version

@andrenarchy
Copy link
Contributor Author

@unguiculus done

@unguiculus
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 15, 2018
@unguiculus
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2018
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 15, 2018
@k8s-ci-robot k8s-ci-robot merged commit 2c0473f into helm:master Aug 15, 2018
marekaf pushed a commit to marekaf/charts that referenced this pull request Sep 4, 2018
…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>
aba182 pushed a commit to aba182/charts that referenced this pull request Sep 7, 2018
…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>
aba182 pushed a commit to aba182/charts that referenced this pull request Sep 7, 2018
…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>
Jnig pushed a commit to Jnig/charts that referenced this pull request Nov 13, 2018
…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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants