forked from kubernetes-sigs/external-dns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new --cloudflare-custom-hostnames flag to enable cloudflare custo…
…m hostnames support
- Loading branch information
1 parent
89cc46f
commit 3dbf015
Showing
6 changed files
with
55 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -861,6 +861,7 @@ func TestCloudflareProvider(t *testing.T) { | |
endpoint.NewDomainFilter([]string{"bar.com"}), | ||
provider.NewZoneIDFilter([]string{""}), | ||
false, | ||
false, | ||
true, | ||
5000, | ||
"") | ||
|
@@ -878,6 +879,7 @@ func TestCloudflareProvider(t *testing.T) { | |
endpoint.NewDomainFilter([]string{"bar.com"}), | ||
provider.NewZoneIDFilter([]string{""}), | ||
false, | ||
false, | ||
true, | ||
5000, | ||
"") | ||
|
@@ -892,6 +894,7 @@ func TestCloudflareProvider(t *testing.T) { | |
endpoint.NewDomainFilter([]string{"bar.com"}), | ||
provider.NewZoneIDFilter([]string{""}), | ||
false, | ||
false, | ||
true, | ||
5000, | ||
"") | ||
|
@@ -905,6 +908,7 @@ func TestCloudflareProvider(t *testing.T) { | |
endpoint.NewDomainFilter([]string{"bar.com"}), | ||
provider.NewZoneIDFilter([]string{""}), | ||
false, | ||
false, | ||
true, | ||
5000, | ||
"") | ||
|
@@ -1526,7 +1530,7 @@ func TestCustomTTLWithEnabledProxyNotChanged(t *testing.T) { | |
func TestCloudFlareProvider_Region(t *testing.T) { | ||
_ = os.Setenv("CF_API_TOKEN", "abc123def") | ||
_ = os.Setenv("CF_API_EMAIL", "[email protected]") | ||
provider, err := NewCloudFlareProvider(endpoint.NewDomainFilter([]string{"example.com"}), provider.ZoneIDFilter{}, true, false, 50, "us") | ||
provider, err := NewCloudFlareProvider(endpoint.NewDomainFilter([]string{"example.com"}), provider.ZoneIDFilter{}, true, false, false, 50, "us") | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
|
@@ -1557,7 +1561,7 @@ func TestCloudFlareProvider_updateDataLocalizationRegionalHostnameParams(t *test | |
func TestCloudFlareProvider_newCloudFlareChange(t *testing.T) { | ||
_ = os.Setenv("CF_API_KEY", "xxxxxxxxxxxxxxxxx") | ||
_ = os.Setenv("CF_API_EMAIL", "[email protected]") | ||
provider, err := NewCloudFlareProvider(endpoint.NewDomainFilter([]string{"example.com"}), provider.ZoneIDFilter{}, true, false, 50, "us") | ||
provider, err := NewCloudFlareProvider(endpoint.NewDomainFilter([]string{"example.com"}), provider.ZoneIDFilter{}, true, false, false, 50, "us") | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
|
@@ -1705,7 +1709,8 @@ func TestCloudflareZoneRecordsFail(t *testing.T) { | |
customHostnames: map[string]map[string]cloudflare.CustomHostname{}, | ||
} | ||
failingProvider := &CloudFlareProvider{ | ||
Client: client, | ||
Client: client, | ||
customHostnames: true, | ||
} | ||
ctx := context.Background() | ||
|
||
|
@@ -1718,7 +1723,8 @@ func TestCloudflareZoneRecordsFail(t *testing.T) { | |
func TestCloudflareDNSRecordsOperationsFail(t *testing.T) { | ||
client := NewMockCloudFlareClient() | ||
provider := &CloudFlareProvider{ | ||
Client: client, | ||
Client: client, | ||
customHostnames: true, | ||
} | ||
ctx := context.Background() | ||
domainFilter := endpoint.NewDomainFilter([]string{"bar.com"}) | ||
|
@@ -1831,7 +1837,8 @@ func TestCloudflareDNSRecordsOperationsFail(t *testing.T) { | |
func TestCloudflareCustomHostnameOperations(t *testing.T) { | ||
client := NewMockCloudFlareClient() | ||
provider := &CloudFlareProvider{ | ||
Client: client, | ||
Client: client, | ||
customHostnames: true, | ||
} | ||
ctx := context.Background() | ||
domainFilter := endpoint.NewDomainFilter([]string{"bar.com"}) | ||
|
@@ -2172,7 +2179,8 @@ func TestCloudflareCustomHostnameOperations(t *testing.T) { | |
func TestCloudflareCustomHostnameNotFoundOnRecordDeletion(t *testing.T) { | ||
client := NewMockCloudFlareClient() | ||
provider := &CloudFlareProvider{ | ||
Client: client, | ||
Client: client, | ||
customHostnames: true, | ||
} | ||
ctx := context.Background() | ||
zoneID := "001" | ||
|