mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-11-03 04:01:04 +01:00
Merge pull request #1859 from Sh4d1/scaleway_cname
fix(scaleway): only use absolute CNAMEs
This commit is contained in:
commit
ae1054519c
@ -17,6 +17,7 @@
|
|||||||
- Update contributing section in README (#1760) @seanmalloy
|
- Update contributing section in README (#1760) @seanmalloy
|
||||||
- Option to cache AWS zones list @bpineau
|
- Option to cache AWS zones list @bpineau
|
||||||
- Refactor, enhance and test Akamai provider and documentation (#1846) @edglynes
|
- Refactor, enhance and test Akamai provider and documentation (#1846) @edglynes
|
||||||
|
- Fix: only use absolute CNAMEs in Scaleway provider (#1859) @Sh4d1
|
||||||
|
|
||||||
## v0.7.3 - 2020-08-05
|
## v0.7.3 - 2020-08-05
|
||||||
|
|
||||||
|
|||||||
@ -269,8 +269,13 @@ func endpointToScalewayRecords(zoneName string, ep *endpoint.Endpoint) []*domain
|
|||||||
records := []*domain.Record{}
|
records := []*domain.Record{}
|
||||||
|
|
||||||
for _, target := range ep.Targets {
|
for _, target := range ep.Targets {
|
||||||
|
finalTargetName := target
|
||||||
|
if domain.RecordType(ep.RecordType) == domain.RecordTypeCNAME {
|
||||||
|
finalTargetName = provider.EnsureTrailingDot(target)
|
||||||
|
}
|
||||||
|
|
||||||
records = append(records, &domain.Record{
|
records = append(records, &domain.Record{
|
||||||
Data: target,
|
Data: finalTargetName,
|
||||||
Name: strings.Trim(strings.TrimSuffix(ep.DNSName, zoneName), ". "),
|
Name: strings.Trim(strings.TrimSuffix(ep.DNSName, zoneName), ". "),
|
||||||
Priority: priority,
|
Priority: priority,
|
||||||
TTL: ttl,
|
TTL: ttl,
|
||||||
@ -285,9 +290,14 @@ func endpointToScalewayRecordsChangeDelete(zoneName string, ep *endpoint.Endpoin
|
|||||||
records := []*domain.RecordChange{}
|
records := []*domain.RecordChange{}
|
||||||
|
|
||||||
for _, target := range ep.Targets {
|
for _, target := range ep.Targets {
|
||||||
|
finalTargetName := target
|
||||||
|
if domain.RecordType(ep.RecordType) == domain.RecordTypeCNAME {
|
||||||
|
finalTargetName = provider.EnsureTrailingDot(target)
|
||||||
|
}
|
||||||
|
|
||||||
records = append(records, &domain.RecordChange{
|
records = append(records, &domain.RecordChange{
|
||||||
Delete: &domain.RecordChangeDelete{
|
Delete: &domain.RecordChangeDelete{
|
||||||
Data: target,
|
Data: finalTargetName,
|
||||||
Name: strings.Trim(strings.TrimSuffix(ep.DNSName, zoneName), ". "),
|
Name: strings.Trim(strings.TrimSuffix(ep.DNSName, zoneName), ". "),
|
||||||
Type: domain.RecordType(ep.RecordType),
|
Type: domain.RecordType(ep.RecordType),
|
||||||
},
|
},
|
||||||
|
|||||||
@ -93,7 +93,7 @@ func (m *mockScalewayDomain) ListDNSZoneRecords(req *domain.ListDNSZoneRecordsRe
|
|||||||
Type: domain.RecordTypeA,
|
Type: domain.RecordTypeA,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Data: "test.example.com",
|
Data: "test.example.com.",
|
||||||
Name: "two",
|
Name: "two",
|
||||||
TTL: 600,
|
TTL: 600,
|
||||||
Priority: 30,
|
Priority: 30,
|
||||||
@ -330,7 +330,7 @@ func TestScalewayProvider_generateApplyRequests(t *testing.T) {
|
|||||||
Add: &domain.RecordChangeAdd{
|
Add: &domain.RecordChangeAdd{
|
||||||
Records: []*domain.Record{
|
Records: []*domain.Record{
|
||||||
{
|
{
|
||||||
Data: "example.com",
|
Data: "example.com.",
|
||||||
Name: "",
|
Name: "",
|
||||||
TTL: 600,
|
TTL: 600,
|
||||||
Type: domain.RecordTypeCNAME,
|
Type: domain.RecordTypeCNAME,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user