Repository navigation
Closed
Description
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
Installed cert-manager with helm, created cluster-wide issuer, requested certificate. Instead of getting a certificate, the cert-manager pod enters a crash-loop with a panic.
From what I can tell, it happens here. See link below for stack trace and logs.
What you expected to happen:
Cert created.
How to reproduce it (as minimally and precisely as possible):
Setup with contrib helm chart, then
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
name: letsencrypt-staging
spec:
acme:
# The ACME server URL
server: https://acme-staging.api.letsencrypt.org/directory
# Email address used for ACME registration
email: [email protected]
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-staging
# Enable the HTTP-01 challenge provider
http01: {}
---
apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
metadata:
name: monitoring-ingress-cert
spec:
secretName: monitoring-ingress-tls
issuerRef:
name: letsencrypt-staging
kind: ClusterIssuer
commonName: {{ .Values.ingress.domain }}
dnsNames:
- {{ .Values.ingress.domain }}
acme:
config:
- http01:
ingress: monitoring-web
domains:
- {{ .Values.ingress.domain }}Anything else we need to know?:
--v=6 logs and stack trace
Environment:
- Kubernetes version (use
kubectl version):
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", GitCommit:"6e937839ac04a38cac63e6a7a306c5d035fe7b0a", GitTreeState:"clean", BuildDate:"2017-09-28T22:57:57Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.7", GitCommit:"8e1552342355496b62754e61ad5f802a0f3f1fa7", GitTreeState:"clean", BuildDate:"2017-09-28T23:56:03Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
- Cloud provider or hardware configuration**: Azure
- Install tools: Helm
- Others: -
Activity
munnerz commentedon Jan 8, 2018
I think this is coming about due to a bug in the registerAccount function below it - specifically here: https://github.com/jetstack/cert-manager/blob/v0.2.2/pkg/issuer/acme/setup.go#L90-L96
If the error is a typedErr, but does not have a status code of conflict, it will return a nil account as well as a nil error. Instead, this should be:
or something similar
munnerz commentedon Jan 8, 2018
I've opened #237 as a fix for the above
/area provider-acme
carlpett commentedon Jan 8, 2018
Wow, thanks for the fast turnaround there! The build seems to have failed, but I'll try the canary as soon as there is one!
carlpett commentedon Jan 10, 2018
Built it myself and tested it, works nicely. For the record, the error was
Error creating new registration :: empty DNS response validating email domain - no MX/A records. Interestingly, this worked with kube-lego (but I can see how it shouldn't, from LE's point of view)Merge pull request #237 from jetstack/fix-acme-reg-panic