Implement feedback

Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
This commit is contained in:
Maartje Eyskens 2020-07-16 11:03:30 +02:00
parent 98c0f37e6b
commit 61f7bf4153
5 changed files with 9 additions and 9 deletions

View File

@ -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"`
}

View File

@ -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"`
}

View File

@ -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"`
}

View File

@ -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)
}

View File

@ -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"},