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

Represent AWS Alias records as record type A #3910

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

johngmyers
Copy link
Contributor

Description

Causes AWS Alias records to be represented in the planner as records of type A.

This resolves a conflicting interaction between #3747 (which resolves conflicts between CNAME records and records of any other type with the same domain) and #3605 (which gives the planner both CNAME and AAAA records for AWS aliases).

Checklist

  • Unit tests updated
  • End user documentation updated

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 3, 2023
provider/aws/aws_test.go Outdated Show resolved Hide resolved
@mloiseleur
Copy link
Contributor

@johngmyers I understand there is an issue by representing Alias record with CNAME in the plan.

I'm unsure that switching to Type A will really fix it 🤔

Those kind of lines is quite confusing, for instance:

if isAlias, found := r.GetProviderSpecificProperty("alias"); found && isAlias == "true" && recordType == endpoint.RecordTypeA {
		recordType = endpoint.RecordTypeCNAME
	}

I understand that Alias is a (proprietary) extension, not part of current standard, but there is more than one provider implementing this specific record type.

=> Wdyt about adding a new Alias record type in the plan ?

@johngmyers
Copy link
Contributor Author

With #3605 we will need two alias records for a domain, one A and one AAAA. This is because Route53 requires the two records in order for the alias to be dual-stack.

For backwards compatibility, the new-format TXT registry ownership record for an A alias record needs to be formatted as if it were a CNAME.

@johngmyers
Copy link
Contributor Author

And Route53 is the only provider that uses the "alias" ProviderSpecificProperty.

@johngmyers
Copy link
Contributor Author

Wdyt about adding a new Alias record type in the plan ?

That might help other providers, but doesn't help Route53. In Route53, alias records have an underlying type of A, AAAA, etc. and there has to be one alias record per type that is aliased. I wouldn't say Route53 has a good design, but it is what it is.

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
@mloiseleur
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 18, 2023
@johngmyers
Copy link
Contributor Author

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johngmyers

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 Sep 18, 2023
@johngmyers
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit f42e4fe into kubernetes-sigs:master Sep 18, 2023
14 checks passed
@johngmyers johngmyers deleted the a-alias branch September 18, 2023 19:50
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.

None yet

3 participants