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 dualstack support for AWS provider with ALB ingress controllers #1079

Merged
merged 9 commits into from
Jul 4, 2019
Merged

Conversation

twilfong
Copy link
Contributor

This PR adds dualstack support for ALB ingress, and fixes issue #520.

@k8s-ci-robot
Copy link
Contributor

Welcome @twilfong!

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 k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 27, 2019
@twilfong twilfong changed the title add dualstack support for AWS provider with ALB ingress controllers #520 add dualstack support for AWS provider with ALB ingress controllers Jun 27, 2019
source/ingress.go Outdated Show resolved Hide resolved
provider/aws.go Show resolved Hide resolved
endpoint/labels.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 28, 2019
@twilfong
Copy link
Contributor Author

/assign @linki

@njuettner
Copy link
Member

njuettner commented Jul 3, 2019

Another question: Is this cleaned up correctly? When you delete the ingress again, does it clean up both records?

@njuettner njuettner self-assigned this Jul 3, 2019
@twilfong
Copy link
Contributor Author

twilfong commented Jul 3, 2019

Another question: Is this cleaned up correctly? When you delete the ingress again, does it clean up both records?

Yes it does delete both records. Any change (Create, Upsert, or Delete) that goes through the AWS provider will now check for the presence of a dualstack label (with value = "true") in the registry entry for the given endoint (e.g. the TXT record if using TXT registry) if the endpoint returns true for isAWSLoadBalancer(). In the case where these two things are true, the single change of type A is turned into two changes, both A and AAAA. This works for creates, deletes, or upserts.

I modified the TestAWSCreateRecordsWithALIAS case in aws_test.go to include a dualstack loadbalancer. But, we might want to add cases that test delete and update. I did run manual tests to ensure that this works, (deletes and updates,) and the codepath definitely is the same for any kind change. I'm not sure how much extra value would be added by specific test cases for dualstack endpoint upsert/delete, but they would be simple enough to add to aws_test.go if we want them.

@njuettner
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 4, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: njuettner

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 4, 2019
@k8s-ci-robot k8s-ci-robot merged commit 454eb59 into kubernetes-sigs:master Jul 4, 2019
@autarchprinceps
Copy link

Does this work for dualstack NLB on K8s services as well? For example if you use a traefik or nginx or similar load balancer, but with NLB, external-dns enters that as the A record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

5 participants