From 7060fb50196a58099e3ff2f7b1592de4cc8303ad Mon Sep 17 00:00:00 2001 From: James Munnelly Date: Fri, 13 Oct 2017 16:45:04 +0100 Subject: [PATCH] http-01 -> http01, dns-01 -> dns01 --- README.md | 8 ++++---- docs/api-types/issuer/README.md | 5 ++++- docs/api-types/issuer/spec.md | 6 +++--- docs/examples/acme-cert.yaml | 8 ++++---- docs/examples/acme-issuer.yaml | 4 ++-- pkg/apis/certmanager/v1alpha1/types.go | 8 ++++---- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 3b2e82bfd..43e3e90fc 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,9 @@ spec: privateKeySecretRef: name: letsencrypt-staging # Enable the HTTP-01 challenge provider - http-01: {} + http01: {} # ACME dns-01 provider configurations - dns-01: + dns01: # Here we define a list of DNS-01 providers that can solve DNS challenges providers: # We define a provider named 'prod-dns', with configuration for the @@ -144,11 +144,11 @@ spec: - domains: - example.com - www.example.com - http-01: + http01: ingressClass: nginx - domains: - example2.com - dns-01: + dns01: provider: prod-dns ``` diff --git a/docs/api-types/issuer/README.md b/docs/api-types/issuer/README.md index 046442311..6a0c52ee1 100644 --- a/docs/api-types/issuer/README.md +++ b/docs/api-types/issuer/README.md @@ -19,11 +19,14 @@ spec: # Name of a secret used to store the ACME account private key privateKeySecretRef: name: letsncrypt-prod + # Enable HTTP01 validations + http01: {} ``` This is the simplest of ACME issuers - it specifies no DNS-01 challenge providers. HTTP-01 validation can be performed through using Ingress -resources without any additional configuration on the Issuer resource. +resources by enabling the HTTP-01 challenge mechanism (with the `http01: {}` +field). ## Namespacing diff --git a/docs/api-types/issuer/spec.md b/docs/api-types/issuer/spec.md index 85a3c25bb..41354bdc7 100644 --- a/docs/api-types/issuer/spec.md +++ b/docs/api-types/issuer/spec.md @@ -36,7 +36,7 @@ configuring credentials for a DNS provider. In order to allow HTTP01 challenges to be solved, we must enable the HTTP01 challenge provider on our Issuer resource. This can be done through setting the -`http-01` field on the `issuer.spec.acme` stanza. Cert-manager will then create +`http01` field on the `issuer.spec.acme` stanza. Cert-manager will then create and manage Ingress rules in the Kubernetes API server in order to solve HTTP-01 based challenges. @@ -51,7 +51,7 @@ spec: server: https://acme-staging.api.letsencrypt.org/directory privateKeySecretRef: name: example-issuer-account-key - http-01: {} + http01: {} ``` ### ACME issuer with no configured DNS providers @@ -93,7 +93,7 @@ spec: server: https://acme-staging.api.letsencrypt.org/directory privateKeySecretRef: name: example-issuer-account-key - dns-01: + dns01: providers: - name: prod-clouddns clouddns: diff --git a/docs/examples/acme-cert.yaml b/docs/examples/acme-cert.yaml index 02d582ae4..9065b0bf3 100644 --- a/docs/examples/acme-cert.yaml +++ b/docs/examples/acme-cert.yaml @@ -16,20 +16,20 @@ spec: - cm-http-cloudflare.k8s.group acme: config: - - http-01: + - http01: ingressClass: nginx domains: - cm-http-nginx.k8s.group - cm-http-nginx2.k8s.group - - http-01: + - http01: ingressName: my-gce-ingress domains: - cm-http-gce.k8s.group - - dns-01: + - dns01: provider: clouddns domains: - cm-dns-clouddns.k8s.group - - dns-01: + - dns01: provider: cloudflare domains: - cm-dns-cloudflare.k8s.group diff --git a/docs/examples/acme-issuer.yaml b/docs/examples/acme-issuer.yaml index 6384e83a1..3c03f56b2 100644 --- a/docs/examples/acme-issuer.yaml +++ b/docs/examples/acme-issuer.yaml @@ -12,9 +12,9 @@ spec: privateKeySecretRef: name: letsncrypt-prod # Enable the HTTP-01 challenge provider - http-01: {} + http01: {} # ACME dns-01 provider configurations - dns-01: + dns01: # Here we define a list of DNS-01 providers that can solve DNS challenges providers: - name: prod-dns diff --git a/pkg/apis/certmanager/v1alpha1/types.go b/pkg/apis/certmanager/v1alpha1/types.go index 9604ad2e0..452aa2a0f 100644 --- a/pkg/apis/certmanager/v1alpha1/types.go +++ b/pkg/apis/certmanager/v1alpha1/types.go @@ -94,9 +94,9 @@ type ACMEIssuer struct { // user account. PrivateKey SecretKeySelector `json:"privateKeySecretRef"` // HTTP01 config - HTTP01 *ACMEIssuerHTTP01Config `json:"http-01"` + HTTP01 *ACMEIssuerHTTP01Config `json:"http01,omitempty"` // DNS-01 config - DNS01 *ACMEIssuerDNS01Config `json:"dns-01"` + DNS01 *ACMEIssuerDNS01Config `json:"dns01,omitempty"` } type ACMEIssuerHTTP01Config struct { @@ -249,8 +249,8 @@ type ACMECertificateConfig struct { type ACMECertificateDomainConfig struct { Domains []string `json:"domains"` - HTTP01 *ACMECertificateHTTP01Config `json:"http-01,omitempty"` - DNS01 *ACMECertificateDNS01Config `json:"dns-01,omitempty"` + HTTP01 *ACMECertificateHTTP01Config `json:"http01,omitempty"` + DNS01 *ACMECertificateDNS01Config `json:"dns01,omitempty"` } type ACMECertificateHTTP01Config struct {