cockroachdb / cockroachdb/helm-charts

Invalid order when cert-manager is used with TLS enabled

Open
#249 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
105
Forks
152
Avg merge
4d 23h
Merged PRs (30d)
5

Description

**Version**

CockroachDB Helm chart: 7.0.1 (https://charts.cockroachdb.com/)
(I strongly suspect that the same issue hits the latest version too)

**CockroachDB Helm chart configuration**
```
cockroachdb:
tls:
enabled: true
certs:
selfSigner:
enabled: false
certManager: true
useCertManagerV1CRDs: true
tlsSecret: true
certManagerIssuer:
kind: ClusterIssuer
```

**ClusterIssuer**

```
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
email: redacted@domain.com
privateKeySecretRef:
name: letsencrypt-key-prod
server: https://acme-v02.api.letsencrypt.org/directory
solvers:
- dns01:
cloudDNS:
project:
```

**Error**

```
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning InvalidOrder 13m cert-manager-certificaterequests-issuer-acme The CSR PEM requests a commonName that is not present in the list of dnsNames or ipAddresses. If a commonName is set, ACME requires that the value is also present in the list of dnsNames or ipAddresses: "root" does not exist in [] or []
Normal cert-manager.io 13m cert-manager-certificaterequests-approver Certificate request has been approved by cert-manager.io
```

**Related to**
https://github.com/cert-manager/cert-manager/issues/2370#issuecomment-554372660

**Potential solutions**

1. Add the `commonName` to the `dnsNames` list
2. Make the `commonName` customizable in the Helm chart (I'm not sure whether this would mess with any validation in the application itself though)
3. Both alternatives above

This issue similarly affects the order generated for the `node` certificate too:
```
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning InvalidOrder 2m13s cert-manager-certificaterequests-issuer-acme The CSR PEM requests a commonName that is not present in the list of dnsNames or ipAddresses. If a commonName is set, ACME requires that the value is also present in the list of dnsNames or ipAddresses: "node" does not exist in [localhost 127.0.0.1 -public -public.<.Release.Namespace> -public.<.Release.Namespace>.svc.cluster.local *. *..<.Release.Namespace> *..<.Release.Namespace>.svc.cluster.local] or []
```

Jira issue: HELM-25

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.