feat(helm): allow cert-manager to use a public ACME issuer - #514
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #514 +/- ##
==========================================
- Coverage 93.74% 93.70% -0.04%
==========================================
Files 42 42
Lines 2684 2684
==========================================
- Hits 2516 2515 -1
- Misses 167 168 +1
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Enables public ACME issuers by omitting unissuable internal names unless Kubernetes access requires them.
Changes:
- Centralizes TLS SAN generation and validation.
- Makes cert-manager common names optional.
- Updates Helm tests, documentation, and snapshots.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Summary |
|---|---|
deploy/gateway/values.yaml |
Documents conditional Kubernetes SANs. |
deploy/gateway/values.schema.json |
Updates TLS field descriptions. |
deploy/gateway/tests/tls-secret_test.yaml |
Tests Helm-generated certificates. |
deploy/gateway/tests/NOTES_test.yaml |
Updates SAN hash fixtures. |
deploy/gateway/tests/cert-manager_test.yaml |
Tests cert-manager behavior; IP-only validation lacks direct coverage. |
deploy/gateway/tests/__snapshot__/cert-manager_test.yaml.snap |
Updates expected certificate output. |
deploy/gateway/templates/tls-secret.yaml |
Uses shared SAN handling. |
deploy/gateway/templates/cert-manager.yaml |
Supports public issuers and optional common names. |
deploy/gateway/templates/_helpers.tpl |
Centralizes SAN generation, validation, and hashing. |
Suppressed comments (1)
deploy/gateway/tests/cert-manager_test.yaml:152
- This test still supplies
tls.dnsNames, so it would pass even if the newrequireTlsNamesguard incorrectly rejected certificates whose sole identifier is an IP address. Make this case IP-only so the newly supportedtls.ipAddressesbranch is covered.
dnsNames:
- resource.corp.internal
ipAddresses:
- 10.0.0.1
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
5519af2 to
be226c2
Compare
be226c2 to
3a57c13
Compare
| "items": { | ||
| "type": "string" | ||
| "type": "string", | ||
| "minLength": 1 |
There was a problem hiding this comment.
We could add a simple unit test for this:
set:
tls:
autoGenerated:
enabled: true
dnsNames: [""]in tls-secret_test.yaml
| "type": "string", | ||
| "minLength": 1 |
No, not until we support multiple CAs per Gateway in the backend. |
Changes
kubernetesService DNS names to the certificate only when the Gateway serves Kubernetes resources (kubernetes.enabledortwingateOperator.kubernetesResource.enabled), since a public CA refuses them.kubernetes,kubernetes.default,kubernetes.default.svc,kubernetes.default.svc.<clusterDomain>tls.autoGenerated.certManager.commonNameonly when set, instead of defaulting to the chart fullname, which is equally unissuable by a public CA.tls.dnsNamesnortls.ipAddressesleaves the certificate any identifier.Notes
tls.crt,tls.keyandca.crton the first upgrade, because the alternative-names hash now covers a different string and no longer matches thechecksum/alternativeNamesannotation on the existing Secret. Releases withtwingateOperator.gateway.enabled: truere-register the newca.crtthrough the operator; those that registered the CA by hand have to re-register it.