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

fix: Handle wildcard rootHost values #89

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

mikenairn
Copy link
Member

@mikenairn mikenairn commented Apr 22, 2024

closes #88

Fixes an issue where if you specify a wildcard rootHost value e.g. *.example.com the plan would incorrectly filter out changes for valid dnsNames e.g. foo.example.com, and only create exactly matching dnsNames e.g. *.example.com.

Follow on to look at making sure the status is always correctly updated #90

Fixes an issue where if you specify a wildcard rootHost value e.g.
*.example.com the plan would incorrectly filter out changes for valid
dnsNames e.g. foo.example.com, and only create exactly matching dnsNames
e.g. *.example.com.
"RecordTTL": Equal(externaldnsendpoint.TTL(60)),
})),
))
})
Copy link
Member Author

Choose a reason for hiding this comment

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

We have no way of verifying this from the integration test at the moment. Added e2e test for the time being.

@@ -301,7 +301,7 @@ func (r *DNSRecordReconciler) applyChanges(ctx context.Context, dnsRecord *v1alp
logger := log.FromContext(ctx)
filterDomain, _ := strings.CutPrefix(managedZone.Spec.DomainName, v1alpha1.WildcardPrefix)
if dnsRecord.Spec.RootHost != nil {
filterDomain = *dnsRecord.Spec.RootHost
filterDomain, _ = strings.CutPrefix(*dnsRecord.Spec.RootHost, v1alpha1.WildcardPrefix)
Copy link
Member Author

Choose a reason for hiding this comment

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

We might want to consider adding validation onto the rootHost CRD field.

@maleck13 maleck13 added this pull request to the merge queue Apr 22, 2024
Merged via the queue into Kuadrant:main with commit e5e200f Apr 22, 2024
9 checks passed
@mikenairn mikenairn deleted the fix_wildcard_root_host branch April 22, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: wildcards records are not added as expected
2 participants