From 727c6255d73fe2777e72ae918d218688d04b2572 Mon Sep 17 00:00:00 2001 From: Simon Mayer Date: Mon, 26 Aug 2024 10:10:40 +0200 Subject: [PATCH 1/2] Additional provider PowerDNS --- pkg/apis/service/validation/validation.go | 1 + pkg/apis/service/validation/validation_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/apis/service/validation/validation.go b/pkg/apis/service/validation/validation.go index 9341daa4..281c68a0 100644 --- a/pkg/apis/service/validation/validation.go +++ b/pkg/apis/service/validation/validation.go @@ -26,6 +26,7 @@ var supportedProviderTypes = []string{ "openstack-designate", "remote", "rfc2136", + "powerdns", } // ValidateDNSConfig validates the passed DNSConfig. diff --git a/pkg/apis/service/validation/validation_test.go b/pkg/apis/service/validation/validation_test.go index 0aca8c5d..2199a559 100644 --- a/pkg/apis/service/validation/validation_test.go +++ b/pkg/apis/service/validation/validation_test.go @@ -80,7 +80,7 @@ var _ = Describe("Validation", func() { "Type": Equal(field.ErrorTypeInvalid), "Field": Equal("spec.extensions.[@.type='shoot-dns-service'].providerConfig[0].type"), "BadValue": Equal("dummy"), - "Detail": Equal("unsupported provider type. Valid types are: alicloud-dns, aws-route53, azure-dns, azure-private-dns, cloudflare-dns, google-clouddns, infoblox-dns, netlify-dns, openstack-designate, remote, rfc2136"), + "Detail": Equal("unsupported provider type. Valid types are: alicloud-dns, aws-route53, azure-dns, azure-private-dns, cloudflare-dns, google-clouddns, infoblox-dns, netlify-dns, openstack-designate, remote, rfc2136, powerdns"), })), Entry("missing secret name", service.DNSConfig{ Providers: modifyCopy(valid[1:], func(items []service.DNSProvider) { From 23d27ab11aaa2a3c91eebd34c64acabf992d3c97 Mon Sep 17 00:00:00 2001 From: Simon Mayer Date: Tue, 3 Sep 2024 15:38:44 +0200 Subject: [PATCH 2/2] Sort provider correctly --- pkg/apis/service/validation/validation.go | 2 +- pkg/apis/service/validation/validation_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/apis/service/validation/validation.go b/pkg/apis/service/validation/validation.go index 281c68a0..2a19aaaa 100644 --- a/pkg/apis/service/validation/validation.go +++ b/pkg/apis/service/validation/validation.go @@ -24,9 +24,9 @@ var supportedProviderTypes = []string{ "infoblox-dns", "netlify-dns", "openstack-designate", + "powerdns", "remote", "rfc2136", - "powerdns", } // ValidateDNSConfig validates the passed DNSConfig. diff --git a/pkg/apis/service/validation/validation_test.go b/pkg/apis/service/validation/validation_test.go index 2199a559..f4cc5589 100644 --- a/pkg/apis/service/validation/validation_test.go +++ b/pkg/apis/service/validation/validation_test.go @@ -80,7 +80,7 @@ var _ = Describe("Validation", func() { "Type": Equal(field.ErrorTypeInvalid), "Field": Equal("spec.extensions.[@.type='shoot-dns-service'].providerConfig[0].type"), "BadValue": Equal("dummy"), - "Detail": Equal("unsupported provider type. Valid types are: alicloud-dns, aws-route53, azure-dns, azure-private-dns, cloudflare-dns, google-clouddns, infoblox-dns, netlify-dns, openstack-designate, remote, rfc2136, powerdns"), + "Detail": Equal("unsupported provider type. Valid types are: alicloud-dns, aws-route53, azure-dns, azure-private-dns, cloudflare-dns, google-clouddns, infoblox-dns, netlify-dns, openstack-designate, powerdns, remote, rfc2136"), })), Entry("missing secret name", service.DNSConfig{ Providers: modifyCopy(valid[1:], func(items []service.DNSProvider) {