diff --git a/pkg/apis/acme/v1alpha2/types_issuer.go b/pkg/apis/acme/v1alpha2/types_issuer.go index a1b1ddc7d..5608d963a 100644 --- a/pkg/apis/acme/v1alpha2/types_issuer.go +++ b/pkg/apis/acme/v1alpha2/types_issuer.go @@ -351,8 +351,8 @@ type ACMEIssuerDNS01ProviderCloudDNS struct { Project string `json:"project"` // HostedZoneName is an optional field that tells cert-manager in which - // Cloud DNS zone the challenge record has te be create. - // If left empty cert-manager will automatically chose this zone. + // Cloud DNS zone the challenge record has to be created. + // If left empty cert-manager will automatically choose a zone. // +optional HostedZoneName string `json:"hostedZoneName,omitempty"` } diff --git a/pkg/apis/acme/v1alpha3/types_issuer.go b/pkg/apis/acme/v1alpha3/types_issuer.go index 790e0fdd7..6d555be57 100644 --- a/pkg/apis/acme/v1alpha3/types_issuer.go +++ b/pkg/apis/acme/v1alpha3/types_issuer.go @@ -351,8 +351,8 @@ type ACMEIssuerDNS01ProviderCloudDNS struct { Project string `json:"project"` // HostedZoneName is an optional field that tells cert-manager in which - // Cloud DNS zone the challenge record has te be create. - // If left empty cert-manager will automatically chose this zone. + // Cloud DNS zone the challenge record has to be created. + // If left empty cert-manager will automatically choose a zone. // +optional HostedZoneName string `json:"hostedZoneName,omitempty"` } diff --git a/pkg/apis/acme/v1beta1/types_issuer.go b/pkg/apis/acme/v1beta1/types_issuer.go index 3fb964451..80bd5976a 100644 --- a/pkg/apis/acme/v1beta1/types_issuer.go +++ b/pkg/apis/acme/v1beta1/types_issuer.go @@ -351,8 +351,8 @@ type ACMEIssuerDNS01ProviderCloudDNS struct { Project string `json:"project"` // HostedZoneName is an optional field that tells cert-manager in which - // Cloud DNS zone the challenge record has te be create. - // If left empty cert-manager will automatically chose this zone. + // Cloud DNS zone the challenge record has to be created. + // If left empty cert-manager will automatically choose a zone. // +optional HostedZoneName string `json:"hostedZoneName,omitempty"` } diff --git a/pkg/issuer/acme/dns/clouddns/clouddns.go b/pkg/issuer/acme/dns/clouddns/clouddns.go index cfc3fbe12..87e49656e 100644 --- a/pkg/issuer/acme/dns/clouddns/clouddns.go +++ b/pkg/issuer/acme/dns/clouddns/clouddns.go @@ -60,7 +60,7 @@ func NewDNSProvider(project string, saBytes []byte, dns01Nameservers []string, a func NewDNSProviderEnvironment(dns01Nameservers []string, hostedZoneName string) (*DNSProvider, error) { project := os.Getenv("GCE_PROJECT") if saFile, ok := os.LookupEnv("GCE_SERVICE_ACCOUNT_FILE"); ok { - return NewDNSProviderServiceAccount(project, saFile, dns01Nameservers, "") + return NewDNSProviderServiceAccount(project, saFile, dns01Nameservers, hostedZoneName) } return NewDNSProviderCredentials(project, dns01Nameservers, hostedZoneName) } diff --git a/pkg/issuer/acme/dns/clouddns/clouddns_test.go b/pkg/issuer/acme/dns/clouddns/clouddns_test.go index 8bf4ea969..4027a2ea2 100644 --- a/pkg/issuer/acme/dns/clouddns/clouddns_test.go +++ b/pkg/issuer/acme/dns/clouddns/clouddns_test.go @@ -109,7 +109,7 @@ func TestLiveGoogleCloudCleanUp(t *testing.T) { } func TestDNSProvider_getHostedZone(t *testing.T) { - testProvicer, err := NewDNSProviderCredentials("my-project", util.RecursiveNameservers, "test-zone") + testProvider, err := NewDNSProviderCredentials("my-project", util.RecursiveNameservers, "test-zone") assert.NoError(t, err) type args struct { @@ -124,7 +124,7 @@ func TestDNSProvider_getHostedZone(t *testing.T) { }{ { name: "test given hosted zone name", - provider: testProvicer, + provider: testProvider, want: "test-zone", wantErr: false, args: args{domain: "example.com"},