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

add support for wildcard domains #1927

Closed
szuecs opened this issue Jan 19, 2021 · 10 comments
Closed

add support for wildcard domains #1927

szuecs opened this issue Jan 19, 2021 · 10 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@szuecs
Copy link
Contributor

szuecs commented Jan 19, 2021

related: #1810

What would you like to be added:

I think we do not support wildcard domains, because ingress spec did not allow them in v1beta1 and IIRC also not in v1.

People are now working on ingress v2 (aka gateway resource), see also http://sigs.k8s.io/service-apis.

For CRDs we can easily add on our side wildcard and external-dns source CRD has no restriction to the string parameters so wildcard seems to be possible. In case of source CRD, all controllers would need to maintain the external-dns CRD on create/update/delete operations.
For example ALB: when status loadbalancer changes, the controller creating the ALB would also need to update external-dns source CRD, which is quite an overhead if the community have to do it for all controllers (e.g. sig-aws controller, kube-ingress-controller, google, istio, gloo, nginx, .... ).

I think it makes sense to support wildcard hosts like *.example.org, which would need to match [a-z0-9-]+[.].example[.]org, so only one dot supported as in DNS.

Why is this needed:
ingress v2 is in progress and there are other CRDs that might support wildcards or want to support wildcards

@szuecs szuecs added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 19, 2021
@jgrumboe
Copy link
Contributor

@szuecs
I think you would also need to add "-" (dash) as a valid character for the regex matching the wildcard '*'.

@szuecs
Copy link
Contributor Author

szuecs commented Jan 20, 2021

@jgrumboe updated, thanks

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 20, 2021
@siarhei-karanets-epam
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 21, 2021
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 20, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 19, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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.

@zcapper
Copy link

zcapper commented Apr 19, 2024

Came across this after wondering why the annotation on my AWS ingress wasn't working for my wildcard domain:

"external-dns.alpha.kubernetes.io/hostname": "*.foo.com"
"external-dns.alpha.kubernetes.io/ingress-hostname-source": "annotation-only"

Would be great to support this for cases where the ALB gets traffic from many/any domain(s).


EDIT: Turns out the correct format is

"external-dns.alpha.kubernetes.io/hostname": "\\*.foo.com"
"external-dns.alpha.kubernetes.io/ingress-hostname-source": "annotation-only"

@mattn
Copy link

mattn commented May 22, 2024

"external-dns.alpha.kubernetes.io/hostname": "\\*.foo.com"
"external-dns.alpha.kubernetes.io/ingress-hostname-source": "annotation-only"

I'm trying this on cloudflare.

ERRO[0002] failed to create record: DNS Validation Error (1004)  action=CREATE record="a-\\*.foo.com" ttl=1 type=TXT zone=XXXXXXXXXXXXXXXXXXXXXXXXX
FATA[0002] Failed to do run once: failed to submit all changes for the following zones: [XXXXXXXXXXXXXXXXXXXXXXXXX] 

external-dns output this error and then forcefully terminate always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

8 participants