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

Expose ExternalIP of Node as annotation on headless service #1077

Closed

Conversation

aaronhenshaw
Copy link

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

@k8s-ci-robot
Copy link
Contributor

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. 😃

@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 the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jun 24, 2019
@k8s-ci-robot k8s-ci-robot requested review from linki and Raffo June 24, 2019 16:39
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 24, 2019
@aaronhenshaw
Copy link
Author

I signed it

@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 Jun 24, 2019
@zzh8829
Copy link

zzh8829 commented Jul 2, 2019

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 🚀

source/service.go Outdated Show resolved Hide resolved
@@ -365,6 +380,11 @@ func (sc *serviceSource) generateEndpoints(svc *v1.Service, hostname string, pro
log.Warn(err)
}

externalIp := getExternalIpFromAnnotations(svc.Annotations)
if err != nil {
Copy link

Choose a reason for hiding this comment

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

Should there be an err coming from getExternalIpFromAnnotations or should externalIp be checked instead? (as this is, this is checking the err coming from getTTLFromAnnotations)

Copy link
Author

Choose a reason for hiding this comment

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

I removed the check, not sure it's necessary.

The only thing I could do would be if its not "true" but it exists I could throw an error. What do you think?

@aaronhenshaw aaronhenshaw force-pushed the external-host-ip branch 2 times, most recently from 77f4264 to 7758ceb Compare August 4, 2019 22:02
@aaronhenshaw
Copy link
Author

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

@vsimon
Copy link

vsimon commented Aug 4, 2019

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

@tommyknows
Copy link

tommyknows commented Sep 4, 2019

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?

@aaronhenshaw
Copy link
Author

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

@vsimon
Copy link

vsimon commented Sep 4, 2019

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

@zzh8829
Copy link

zzh8829 commented Sep 14, 2019

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?

@domingusj
Copy link

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

@jeanlucmongrain
Copy link

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

@aaronhenshaw
Copy link
Author

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

@zzh8829
Copy link

zzh8829 commented Nov 14, 2019

@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

@TheUltimateC0der
Copy link

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

@domingusj
Copy link

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!

@aaronhenshaw
Copy link
Author

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

Thanks!

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 29, 2020
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 31, 2022
@griffinchoe
Copy link

I went ahead and rebased this change onto the latest version of external-dns. We (along with many others waiting on this feature) would love to get this merged!

@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 May 1, 2022
@mindw
Copy link

mindw commented May 4, 2022

/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 May 4, 2022
@seh
Copy link
Contributor

seh commented May 6, 2022

#2115 merged, which might suffice as an alternative.

@k8s-ci-robot
Copy link
Contributor

@aaronhenshaw: PR needs rebase.

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 added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 6, 2022
@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 Aug 4, 2022
@mindw
Copy link

mindw commented Aug 6, 2022

/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 Aug 6, 2022
@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 Nov 4, 2022
@ThisIsQasim
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 Nov 4, 2022
@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 Feb 2, 2023
@mindw
Copy link

mindw commented Feb 2, 2023

/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 Feb 2, 2023
@k8s-triage-robot
Copy link

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

This bot triages 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 PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this 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 May 3, 2023
@ThisIsQasim
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 May 3, 2023
@mloiseleur
Copy link
Contributor

@aaronhenshaw Do you think you can rebase this PR ?

@mloiseleur
Copy link
Contributor

Since author is not answering, I'm closing this PR.
Feel free to re-open it or open a new one if you need it.
/close

@k8s-ci-robot
Copy link
Contributor

@mloiseleur: Closed this PR.

In response to this:

Since author is not answering, I'm closing this PR.
Feel free to re-open it or open a new one if you need it.
/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
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.