external-dns icon indicating copy to clipboard operation
external-dns copied to clipboard

Expose ExternalIP of Node as annotation on headless service

Open aaronhenshaw opened this issue 5 years ago • 53 comments

Use Case: We need to have external-dns set our DNS to point to the ExternalIP of the node that the pod winds up on.

  • Added an annotation "use-external-host-ip" for Services
  • This will only work when "publish-host-ip" is set on the external-dns deployment

I believe this is kind of mentioned in #632

aaronhenshaw avatar Jun 24 '19 16:06 aaronhenshaw

Welcome @aaronhenshaw!

It looks like this is your first PR to kubernetes-incubator/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-incubator/external-dns has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. :smiley:

k8s-ci-robot avatar Jun 24 '19 16:06 k8s-ci-robot

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: 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.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please sign in with your organization's credentials at https://identity.linuxfoundation.org/projects/cncf to be authorized.
  • If you have done the above and are still having issues with the CLA being reported as unsigned, please log a ticket with the Linux Foundation Helpdesk: https://support.linuxfoundation.org/
  • Should you encounter any issues with the Linux Foundation Helpdesk, send a message to the backup e-mail support address at: [email protected]

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 avatar Jun 24 '19 16:06 k8s-ci-robot

I signed it

aaronhenshaw avatar Jun 24 '19 16:06 aaronhenshaw

This feature is very useful for people that don't use LoadBalancer from cloud providers. Currently, the only other way to expose a service to ExternalIP is using NodePort. However, NodePort is not a very ideal fit, since it doesn't work on ports < 3000.

I think supporting Headless ClusterIP + HostPort + ExternalIP is the way to go for this use case. Hopefully we can get this PR released soon 🚀

zzh8829 avatar Jul 02 '19 20:07 zzh8829

@vsimon, @zzh8829 updated per feedback, let me know if there is anything else. Sorry it took so long, been so swamped recently.

aaronhenshaw avatar Aug 04 '19 22:08 aaronhenshaw

Thanks @aaronhenshaw, can't wait to check this out! The little script snippet in #632 has been chugging along without issue for months now 😃

vsimon avatar Aug 04 '19 23:08 vsimon

Hi, any progress on this? I think this feature would also be useful for scenarios where the loadbalancer IPs are in a NATed network. For example, I have MetalLB provisioning IPs in 192.168.1.1xx, and am using port-forwarding on the router / firewall. I would like to expose the router's Public IP as the DNS endpoint, and not the private IP of the loadbalancer. Would this PR allow this scenario too?

tommyknows avatar Sep 04 '19 20:09 tommyknows

Yeah I would love to get this merged if possible. Or if there is any other feedback I am happy to incorporate it. cc @vsimon @zzh8829

aaronhenshaw avatar Sep 04 '19 21:09 aaronhenshaw

I don't have any other feedback. I don't have approval privileges. The ball is on one of the approvers I guess.

vsimon avatar Sep 04 '19 22:09 vsimon

I have been using my own docker image from this branch for a while, would be great if we can get this into the official image. @linki @Raffo do you guys have some time for code reviews?

zzh8829 avatar Sep 14 '19 21:09 zzh8829

@zzh8829 any chance you could post the steps you used to create the modified container image? I'd also love to have this feature

domingusj avatar Nov 05 '19 04:11 domingusj

I guess this project is falling in unmaintained status, if PR are ignored

jeanlucmongrain avatar Nov 07 '19 08:11 jeanlucmongrain

There is still regular activity here. It would be great to get an update or any info on getting this merged. I am happy to make changes, etc if that would help. @linki @Raffo

aaronhenshaw avatar Nov 11 '19 02:11 aaronhenshaw

@domingusj i cloned this branch and then compiled dockerfile. you can use my prebuild here at zihao/play:external-dns its 2 month old tho

zzh8829 avatar Nov 14 '19 08:11 zzh8829

I also did an image myself. Its based on the latest master. you can check the repo and image out here https://github.com/TheUltimateC0der/external-dns https://hub.docker.com/r/theultimatecoder/external-dns

TheUltimateC0der avatar Nov 14 '19 13:11 TheUltimateC0der

Thank you @zzh8829 and @TheUltimateC0der. I'll do some testing this week. And hopefully your PR will get approved and released soon @aaronhenshaw! Thanks for the contribution!

domingusj avatar Nov 14 '19 15:11 domingusj

Hey any updates here. We would love to get this merged and move back to using the external-dns main releases!

Thanks!

aaronhenshaw avatar Jan 29 '20 14:01 aaronhenshaw

Possibly related PR? https://github.com/kubernetes-sigs/external-dns/pull/1391

domingusj avatar Feb 17 '20 17:02 domingusj

#1391 seems about the same. any feedback from anyone working on the project about how to get this or that one merged would be amazing.

aaronhenshaw avatar Feb 19 '20 02:02 aaronhenshaw

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

fejta-bot avatar May 19 '20 03:05 fejta-bot

/remove-lifecycle stale

vsimon avatar May 19 '20 04:05 vsimon

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

fejta-bot avatar Aug 17 '20 04:08 fejta-bot

/remove-lifecycle stale

vsimon avatar Aug 17 '20 07:08 vsimon

/kind feature

seanmalloy avatar Aug 19 '20 05:08 seanmalloy

@aaronhenshaw sorry this PR didn't get attention in the past. It looks like there are currently merge conflicts with the PR. If you can rebase and get the merge conflicts cleaned up, we will do our best to get it reviewed and merged. Thanks!

vinny-sabatini avatar Aug 31 '20 18:08 vinny-sabatini

@vinny-sabatini Amazing! Me or someone from our team will take a pass in the next couple of weeks. We would be really excited to get this merged so we can stop running a fork!

aaronhenshaw avatar Sep 01 '20 17:09 aaronhenshaw

/assign @Raffo

artburkart avatar Oct 23 '20 16:10 artburkart

Hi, the PR has been rebased. Something we haven't done yet is verify that the updated change set works as-is with the newer ExternalDNS code. The failed GitHub action indicates the rebase wasn't fully successful, so we'll follow up with fixes soon. 👍

artburkart avatar Oct 23 '20 16:10 artburkart

It looks like we probably just have to swap "v" for "pod".

artburkart avatar Oct 23 '20 16:10 artburkart

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

fejta-bot avatar Jan 21 '21 17:01 fejta-bot