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

Source IPv6 node IPs as AAAA endpoints #1887

Closed
wants to merge 1 commit into from
Closed

Source IPv6 node IPs as AAAA endpoints #1887

wants to merge 1 commit into from

Conversation

danopia
Copy link

@danopia danopia commented Dec 8, 2020

Description

In an IPv6-enabled cluster, it's possible (and legitiment) for a node's .status.addresses list to contain IPv6 addresses. Usually alongside an IPv4 address for dual-stack clusters. Here's a partial example: https://kubernetes.io/docs/tasks/network/validate-dual-stack/#validate-node-addressing

Multiple external-dns sources assume that every IP address is IPv4 and thus has A hardcoded as the record type. This results in invalid DNS endpoints being generated. With the node source, this means the sync loop is broken while such a node is still present.

This PR replaces some of the node.go logic to support creating either an A endpoint, or an AAAA endpoint, or both at the same time, for each node. Some of the logic might be questionable and I welcome the review.

Fixes #1875 but does not actually result in AAAA records being created at this time because external-dns itself does not support AAAA records yet. The planner needs some work to support dual-stack records properly and I'm considering it out of scope of upgrading each source to emit proper endpoints.

So, this PR fixes invalid A endpoints being generated, and replaces them with correct AAAA endpoints that simply aren't actioned on at this point in time.

Checklist

  • Unit tests updated
  • End user documentation updated

@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 Dec 8, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @danopia!

It looks like this is your first PR to kubernetes-sigs/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-sigs/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

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: danopia
To complete the pull request process, please assign raffo after the PR has been reviewed.
You can assign the PR to them by writing /assign @raffo in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. 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 Dec 8, 2020
@hrvolapeter
Copy link

It's there any update on the progress? Seems like there weren't any comments from maintainers. This PR seems to mitigate problem with IPv6. Currently external-dns creates A records with IPv6 which fails on cloud provider validation

@danopia
Copy link
Author

danopia commented Feb 26, 2021

Correct assessment @hrvolapeter. IPv6 support in general is pretty much lacking until further work is done.

Due to this (and other) painpoints, and especially after #1923 I've invested in my own from-scratch analogue of external-dns: https://github.com/danopia/kubernetes-dns-sync & no longer run external-dns myself. However I still would like to see good IPv6 support across the ecosystem so I'm keeping this PR open to see where it goes.

gerhard added a commit to thechangelog/changelog.com that referenced this pull request Mar 3, 2021
Includes DNSEndpoint support, but read the comments in the template.yml
for gotchas. TL;DR only A & CNAME records are supported. AAAA is
most missed.

re kubernetes-sigs/external-dns#1923
re kubernetes-sigs/external-dns#1887

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
@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 Apr 13, 2021
@danopia danopia mentioned this pull request May 7, 2021
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 30, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 1, 2021
@danopia
Copy link
Author

danopia commented Jul 1, 2021

Rebased; there was a conflict from this new line https://github.com/kubernetes-sigs/external-dns/blame/979c2d611bb7a626dfaaade5fe36f7693949a733/source/node.go#L154 which I moved down into the endpoints loop since this changeset can introduce up to two endpoint records per node.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 11, 2021
@k8s-ci-robot
Copy link
Contributor

@danopia: 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-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 9, 2021
@bootc
Copy link

bootc commented Nov 9, 2021

/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 9, 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 Feb 7, 2022
@danopia
Copy link
Author

danopia commented Feb 7, 2022

I'll finally accept the staleness of this; as of 2022 I have a pretty low appetite for rebasing on this codebase. Hopefully improved AAAA support will eventually merge from other contributions.

@danopia danopia closed this Feb 7, 2022
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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. 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.

'Nodes' source assumes all discovered IPs are IPv4
6 participants