Implement feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
This commit is contained in:
parent
98c0f37e6b
commit
61f7bf4153
@ -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"`
|
||||
}
|
||||
|
||||
@ -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"`
|
||||
}
|
||||
|
||||
@ -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"`
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
@ -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"},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user