fix: label wildcard certs so apex SAN uses DNS-01 - #40
Merged
Conversation
Wildcard Certificates cover both the apex and `*.<domain>`. The shared letsencrypt Issuer still selects HTTP-01 for the apex SAN, which loops forever behind Cloudflare/CDN. Label wildcard Certificates `use-dns01=true` so the Issuer's labeled DNS-01 solver (playbook companion) is selected for every SAN. Apex-only certs stay unlabeled and keep HTTP-01. Fixes #38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #38. Alternative to #39 (do not merge #39 — it points at a ClusterIssuer that does not exist).
Companion: deploys-app/playbook#3 (apply that Issuer first).
Why
A wildcard
Certificateis[apex, *.apex]. cert-manager auto-filters HTTP-01 only for the*.SAN. The sharedIssuer/letsencryptthen HTTP-01s the apex, which loops forever behind Cloudflare/CDN (~17k failed/.well-known/acme-challenge/requests/day on sim789.com).PR #5 originally branched wildcard rows to ClusterIssuer
letsencrypt-dns01, then simplified because that object “doesn't need to exist.” The mixed-Issuer filter claim is true for*.and false for the apex SAN.A new ClusterIssuer is the wrong shape: certs live in
deploysnext to the namespaced Issuer, and ClusterIssuer secrets resolve from--cluster-resource-namespace(notdeploys). Expanding the DNS-01 selector by dnsName cannot tell wildcard-apex from an apex-only cert (those have no_acme-challengeCNAME).Change
Keep
Issuer/letsencrypt. Label wildcard Certificatesuse-dns01=true. playbook#3 adds a DNS-01 solver withmatchLabelsfor that label (cnameStrategy: Follow), so both SANs on that Certificate use DNS-01. Apex-only certs stay unlabeled and keep HTTP-01.Createdwildcard certs are not re-applied (onlyPendingCreateis). Those already issued via HTTP-01 on apex, so renewal stays as today until the row cycles back throughPendingCreate.Rollout