-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Allow specification of targets
in VirtualServer's spec.externalDNS
field
#7009
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview will be available once build job completes!
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7009 +/- ##
==========================================
+ Coverage 52.73% 52.77% +0.04%
==========================================
Files 89 89
Lines 20824 20873 +49
==========================================
+ Hits 10981 11016 +35
- Misses 9389 9399 +10
- Partials 454 458 +4 ☔ View full report in Codecov by Sentry. |
} | ||
|
||
if count > 1 { | ||
return nil, "", errors.New("multiple record types (A, AAAA, CNAME) detected; must be homogeneous") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having both A & AAAA records is a valid use case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a valid point. However, given that the VirtualServer.spec.externalDNS
object includes a recordType
field, indicating that each DNS entry must be homogeneous, it’s reasonable to expect this limitation to a single record type.
var recordA, recordAAAA, recordCNAME bool | ||
|
||
for _, t := range targets { | ||
if errMsg := validation.IsValidIP(field.NewPath(""), t); len(errMsg) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IsValidIP is a wrapper for netutils.ParseIPSloppy(), there is probably no need to call it twice
Proposed changes
Implements #5196
Checklist
Before creating a PR, run through this checklist and mark each as complete.