Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multiple hostnames in hostname annotation #256

Conversation

totallyunknown
Copy link
Contributor

This is a PR for #197. Is there something missing? :)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 29, 2017
@hjacobs
Copy link
Contributor

hjacobs commented Jun 30, 2017

Thanks for the PR again 😄 (looks good to me so far, not sure if something is missing?)

endpoints = append(endpoints, endpoint.NewEndpoint(hostname, lb.Hostname, ""))
hostnames := parseHostnameAnnotation(hostnameAnnotation)

for _, hostname := range hostnames {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe inline?

for _, hostname := range parseHostnameAnnotation(hostnameAnnotation) {

@ideahitme
Copy link

LGTM

But would like to note that if at some point we will be supporting custom TTL/Record Type per record configuration, we will have to change the specs format, as current , separated list will not allow u to do so. Thanks for the PR

@totallyunknown totallyunknown changed the title WIP: Support for multiple hostnames in hostname annotation Support for multiple hostnames in hostname annotation Jul 4, 2017
@totallyunknown
Copy link
Contributor Author

Yes, totally makes sense. Is there a spec for this change? Maybe I'll implement it.

@ideahitme
Copy link

ideahitme commented Jul 4, 2017

@totallyunknown there is currently no clear defined specs, but some related issues:

#24
#117

But it would be great if u create a proposal in #24

Let me have a final look at this and we can get this merged, IMO #24 should not be blocking this PR, at the end of the day once we graduate from alpha, we are free to use new annotation labels with the right format

CHANGELOG.md Outdated
@@ -1,6 +1,7 @@
- The flag `--domain-filter` can be repeated multiple times like `--domain-filter=example.com --domain-filter=company.org.`.
- A trailing period is not required anymore for `--domain-filter` when AWS (or any other) provider is used.

- The `external-dns.alpha.kubernetes.io/hostname` annotation accepts now a comma separated list of hostnames and a trailing period is not required anymore.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: this should go on the top of the changelog. The idea is once release is prepared we will just have to add the date, and what follows is in the chronological order from most recent onwards

@ideahitme ideahitme merged commit bcb4972 into kubernetes-sigs:master Jul 4, 2017
@ensonic
Copy link

ensonic commented Jul 5, 2017

@jrnt30 jrnt30 marked this as a duplicate of #277 Jul 14, 2017
@kellycampbell
Copy link

This doesn't seem to handle the compatibility case for route53 annotations. e.g. I have a service with

labels: dns: route53 annotations: domainName: "firstdomain,seconddomain"

external-dns-0.4.1 with --compatibility=molecule finds this and registers it, but only one hostname which has the exact domainName value including comma.

@linki
Copy link
Member

linki commented Aug 2, 2017

@kellycampbell You're right. We missed this case. I created a PR that should fix it: #301 Would you mind taking a look?

ffledgling pushed a commit to ffledgling/external-dns that referenced this pull request Jan 18, 2018
…s#256)

* service source: support for multiple hostnames per annotation

* go fmt

* Make parseHostnameAnnontations inline

* Update CHANGELOG.md

* Update Changelog
hopkinsth added a commit to hopkinsth/external-dns that referenced this pull request Jul 10, 2024
Setting multiple hostnames through this annotation has been possible since kubernetes-sigs#256, but this behavior has not been sufficiently documented before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants