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

Ingress: external-dns.alpha.kubernetes.io/hostname: force usage #1053

Closed
bitsofinfo opened this issue May 30, 2019 · 34 comments
Closed

Ingress: external-dns.alpha.kubernetes.io/hostname: force usage #1053

bitsofinfo opened this issue May 30, 2019 · 34 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

@bitsofinfo
Copy link

bitsofinfo commented May 30, 2019

Currently if I have an Ingress defined with annotation:

external-dns.alpha.kubernetes.io/hostname: my.domain1.com

The Ingress also has:

 ...
- host: my.domain1.com
   ...
- host: www.domain1.com
   ...

external-dns creates dns records for BOTH my.domain1.com and www.domain1.com

It would be great if an option or additional annotation could be added that could instruct external-dns to ONLY create entries for what is in external-dns.alpha.kubernetes.io/hostname and ignore whats in the Ingress - hosts stanzas.

I need this for situations where the service behind an ingress is accessed directly via certain names but can also accessed via other proxies in front of it. So it needs to be concerned with all possible Host: headers.... but I don't necessarily want to alter DNS for all of them if that makes sense.

@jhoos
Copy link

jhoos commented Jul 8, 2019

I have a similar situation that would benefit from this. We have a public-facing AWS ALB ingress that we place behind a CloudFront distribution. Ideally we'd like to be able to just have a single DNS record for that ALB, configured via external-dns.alpha.kubernetes.io/hostname or something similar, and then suppress the DNS entries for all of the host entries in the ingress so that we can have those DNS entries point to CloudFront instead (which would then be configured to pass the Host header through to the ALB for route selection).

@bmudda
Copy link

bmudda commented Aug 1, 2019

+1

@wallentx
Copy link

With external DNS creating records for entries in the ingress :

...

This conflicts with what I want to happen with ingress-nginx.
If in my ingress-nginx Ingress annotation I have:

external-dns.alpha.kubernetes.io/hostname: "*.my.domain1.com."

This will route all traffic that doesn't have a r53 entry to the ingress-nginx ALB. This is the intended effect. ingress-nginx sets up it's configuration by reading the ingress:

spec:
rules:
- host: my.domain1.com
http:
paths:
- path: /
backend:
serviceName: my-svc
servicePort: 80

As of at least the latest release, this is creating a r53 entry for my.domain1.com with an A record that resolves to the internal kubernetes cluster internal IP.

@morganchristiansson
Copy link

morganchristiansson commented Oct 28, 2019

@wallentx Surely you mean ingress-nginx service annotation

Just set --source service and omit ingress and external-dns will create your wildcard dns for the ingress-nginx services and ignore all ingress hosts. This may work in your case but it ignores all ingress hostnames so may not work for everyone.

@morganchristiansson
Copy link

morganchristiansson commented Oct 28, 2019

Per the code in github the annotation only adds names to the list. There is no way to remove or override hostnames. https://github.com/kubernetes-incubator/external-dns/blob/master/source/ingress.go#L270-L289

You can however use the TXT registry to stop external-dns from managing certain records and then take over management of those records.

This comment has more details #819 (comment)

@max-lobur
Copy link

max-lobur commented Oct 30, 2019

Using TXT would force me to use A instead of CNAME because you can't have CNAME alongside TXT :(

However, not having a TXT at all, while having just a CNAME works:

Skipping endpoint test.domain 300 IN CNAME test.us-west-2.dev.domain [] because owner id does not match

Thankfully external DNS considers a missing txt an owner mismatch 🤞

Downside: this produces logs like these, and I need to ensure I have CNAME before I create ingress. Still would like to have a way to skip certain hostnames in ingress, or force annotation hostname like proposed in this issue.

@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-testing, kubernetes/test-infra and/or fejta.
/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 Jan 28, 2020
@bitsofinfo
Copy link
Author

not stale

@bitsofinfo
Copy link
Author

/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 Jan 28, 2020
@morganchristiansson
Copy link

@max-lobur Use the --txt-prefix option

@meshok0
Copy link

meshok0 commented Apr 10, 2020

An option to force external-dns to ignore hostnames from ingress and create records for hostnames from external-dns.alpha.kubernetes.io/hostname only would be great.
This will help with scenarios where you want to put some proxy(WAF, for example) between clients and ALB.

@dansimone
Copy link
Contributor

#1650 is a potential solution to this problem.

@seanmalloy
Copy link
Member

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 14, 2020
@jxy859
Copy link

jxy859 commented Sep 22, 2020

+1

@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-testing, kubernetes/test-infra and/or fejta.
/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 Dec 21, 2020
@haslersn
Copy link

not stale

@bitsofinfo
Copy link
Author

/remove-lifecycle stale

stale bots are so annoying

@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 Jan 14, 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 Apr 14, 2021
@haslersn
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 15, 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 14, 2021
@haslersn
Copy link

The specific use case described by the OP can be solved on the ingress controller side: kubernetes/ingress-nginx#6752

However, there might be other use cases where the feature requested here is required.

/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 Jul 14, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough 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 stale
  • Mark this issue or PR as rotten with /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 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 Oct 12, 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 Nov 11, 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.

@bitsofinfo
Copy link
Author

/remove-lifecycle stale

@bitsofinfo
Copy link
Author

/reopen

@k8s-ci-robot
Copy link
Contributor

@bitsofinfo: Reopened this issue.

In response to this:

/reopen

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.

@k8s-ci-robot k8s-ci-robot reopened this Dec 13, 2021
@bitsofinfo
Copy link
Author

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Dec 13, 2021
@dudicoco
Copy link

This functionality was added in #1696

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough 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 stale
  • Mark this issue or PR as rotten with /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 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 11, 2022
@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 May 11, 2022
@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.

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