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 registering Pod IPs #195

Closed
linki opened this issue May 5, 2017 · 9 comments
Closed

Add support for registering Pod IPs #195

linki opened this issue May 5, 2017 · 9 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Comments

@linki
Copy link
Member

linki commented May 5, 2017

Triggered by #187 @hjacobs came up with the idea of a PodSource instead of scraping Services for Endpoints.

One could annotate a Pod (or more likely, a PodSpec in a Deployment) with a desired hostname or a fqdn-template.

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: nginx
spec:
  replicas: 3
  template:
    metadata:
      annotations:
        external-dns.alpha.kubernetes.io: foo.example.org
    spec:
      ...

ExternalDNS could find them and add their Pod IPs to the DNS provider. In this case three A records pointing to the three pods.

Why not use Headless Services?

@linki linki changed the title Add support for exposing Pod IPs Add support for registering Pod IPs May 5, 2017
@linki linki added kind/feature Categorizes issue or PR as related to a new feature. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. size/medium labels Jun 12, 2017
@tamalsaha
Copy link
Contributor

tamalsaha commented Nov 6, 2017

@linki, any plans on supporting this or Headless service? Without either of these, folks on bare metal cluster can't really use external-dns.

@hjacobs
Copy link
Contributor

hjacobs commented Nov 22, 2017

I think this is a duplicate of #315 and might be closed?

@linki linki added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/medium labels Jan 2, 2018
@alfredkrohmer
Copy link
Contributor

alfredkrohmer commented Jan 29, 2019

@hjacobs If I understand this correctly, the #315 is doing something else.

Right now there are two possibilities:

  • headless service with pods that have their hostname set (e.g. StatefulSet); when you set the hostname annotation on the corresponding service to foo.bar, external-dns will create records pod-1.foo.bar, pod-2.foo.bar, etc.
  • headless service with pods that do not have their hostname set (e.g. Deployment); when you set the hostname annotation on the corresponding service to foo.bar, external-dns will create one record foo.bar, which points to all the pods in the deployment (at least since Support A record for multile IPs for a headless services. #645 was merged, before it was only one pod)

I think what OP wants (and what we would need as well) is:

  • no service necessary; when you set the hostname annotation on the pod itself to foo.bar, external-dns will create one record per pod, e.g. pod-d139d9ad-29a9s.foo.bar, pod-d139d9ad-xs023.foo.bar, etc. that point to the corresponding pod IPs.
  • bonus points: add a custom pod condition that only becomes ready once the DNS records has been created (e.g. in Route53, when the zone update has propagated)

We currently would need that because we are terminating TLS in the pods, so we need a valid hostname on the pod itself.

@kevincox
Copy link

I was interpreting this differently. I want to register the IP of all pods in DNS so that the client will connect to one of the pods. Basically a poor man's load balancing. So if I have pods on 10.0.0.{1,2,3} I would want three A records for the hostname I have set for the pod.

@alfredkrohmer
Copy link
Contributor

alfredkrohmer commented Jan 30, 2019

But this is already working?

@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 Apr 30, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

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 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 30, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/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.

lou-lan pushed a commit to lou-lan/external-dns that referenced this issue May 11, 2022
* Add helpers for paths of plugin receipts

* Add google/go-cmp for expressive diffs in test assertions

* Remove plugin receipt on uninstall

* Save plugin manifest in receipt directory

* Load plugin manifest from receipts directory or the index

* Do not expect specific folder layout in LoadPluginFileFromFS

* Fix godoc for environment paths

* Review comments

* Swap plugin install and saving receipts

Saving receipts is less prone to failure than the whole plugin
installation. When swapped, krew will have an inconsistent state in
fewer occasions.

* Add test to ensure LoadManifestFromReceiptOrIndex returns ENOENT error when plugin does not exist

* Put receipts in folder 'receipts' instead of 'receipts/krew-index'

* Fix linter issues

* Rename ReceiptsPath -> InstallReceiptPath

* Save the new install receipt when upgrading a plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

No branches or pull requests

7 participants