Change wording from "accounts" to "account"

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>
This commit is contained in:
Max Ehrlich 2018-08-13 12:57:53 -04:00
parent 9a0b1d8f56
commit b1eadabf42
No known key found for this signature in database
GPG Key ID: 439AC62D3C8A495A
6 changed files with 10 additions and 11 deletions

View File

@ -535,7 +535,7 @@ Appears In:
</thead>
<tbody>
<tr>
<td><code>accountsSecretRef</code><br /> <em><a href="#secretkeyselector-v1alpha1">SecretKeySelector</a></em></td>
<td><code>accountSecretRef</code><br /> <em><a href="#secretkeyselector-v1alpha1">SecretKeySelector</a></em></td>
<td></td>
</tr>
<tr>

View File

@ -200,8 +200,8 @@ type ACMEIssuerDNS01ProviderAzureDNS struct {
// ACMEIssuerDNS01ProviderAcmeDNS is a structure containing the
// configuration for ACME-DNS servers
type ACMEIssuerDNS01ProviderAcmeDNS struct {
Host string `json:"host"`
AccountsSecret SecretKeySelector `json:"accountsSecretRef"`
Host string `json:"host"`
AccountSecret SecretKeySelector `json:"accountSecretRef"`
}
// IssuerStatus contains status information about an Issuer

View File

@ -178,7 +178,7 @@ func (in *ACMEIssuerDNS01Provider) DeepCopy() *ACMEIssuerDNS01Provider {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ACMEIssuerDNS01ProviderAcmeDNS) DeepCopyInto(out *ACMEIssuerDNS01ProviderAcmeDNS) {
*out = *in
out.AccountsSecret = in.AccountsSecret
out.AccountSecret = in.AccountSecret
return
}

View File

@ -197,7 +197,7 @@ func ValidateACMEIssuerDNS01Config(iss *v1alpha1.ACMEIssuerDNS01Config, fldPath
}
if p.AcmeDNS != nil {
numProviders++
el = append(el, ValidateSecretKeySelector(&p.AcmeDNS.AccountsSecret, fldPath.Child("acmedns", "accounts"))...)
el = append(el, ValidateSecretKeySelector(&p.AcmeDNS.AccountSecret, fldPath.Child("acmedns", "accountSecretRef"))...)
if len(p.AcmeDNS.Host) == 0 {
el = append(el, field.Required(fldPath.Child("acmedns", "host"), ""))
}

View File

@ -24,7 +24,7 @@ type DNSProvider struct {
// Credentials and acme-dns server host are given in environment variables
func NewDNSProvider() (*DNSProvider, error) {
host := os.Getenv("ACME_DNS_HOST")
accountJson := os.Getenv("ACME_DNS_ACCOUNTS_JSON")
accountJson := os.Getenv("ACME_DNS_ACCOUNT_JSON")
return NewDNSProviderHostBytes(host, []byte(accountJson))
}
@ -54,7 +54,6 @@ func (c *DNSProvider) Present(domain, token, keyAuth string) error {
return err
}
if account, exists := c.accounts[domain]; exists {
// Update the acme-dns TXT record.
return c.client.UpdateTXTRecord(account, value)

View File

@ -247,17 +247,17 @@ func (s *Solver) solverForIssuerProvider(issuer v1alpha1.GenericIssuer, provider
s.DNS01Nameservers,
)
case providerConfig.AcmeDNS != nil:
accountsSecret, err := s.secretLister.Secrets(resourceNamespace).Get(providerConfig.AcmeDNS.AccountsSecret.Name)
accountSecret, err := s.secretLister.Secrets(resourceNamespace).Get(providerConfig.AcmeDNS.AccountSecret.Name)
if err != nil {
return nil, fmt.Errorf("error getting acmedns accounts secret: %s", err)
}
accountsSecretBytes, ok := accountsSecret.Data[providerConfig.AcmeDNS.AccountsSecret.Key]
accountSecretBytes, ok := accountSecret.Data[providerConfig.AcmeDNS.AccountSecret.Key]
if !ok {
return nil, fmt.Errorf("error getting acmedns accounts secret: key '%s' not found in secret", providerConfig.AcmeDNS.AccountsSecret.Key)
return nil, fmt.Errorf("error getting acmedns accounts secret: key '%s' not found in secret", providerConfig.AcmeDNS.AccountSecret.Key)
}
impl, err = s.dnsProviderConstructors.acmeDNS(providerConfig.AcmeDNS.Host, accountsSecretBytes)
impl, err = s.dnsProviderConstructors.acmeDNS(providerConfig.AcmeDNS.Host, accountSecretBytes)
default:
return nil, fmt.Errorf("no dns provider config specified for provider %q", providerName)
}