在研究 cert-manager 使用 webhook 方式调用 dnspod 使用 DNS-01 方式签发 SSL 证书遇到问题,一直得到错误:
CodeBlock Loading...
我使用了以下资源:
- https://github.com/cert-manager/cert-manager
- https://github.com/cert-manager/webhook-example
- https://github.com/imroc/cert-manager-webhook-dnspod
在相关仓库找到这些 issue
发现,只要申请证书的域名能够匹配到 CNAME 记录,就会默认跟随,找不到正确的 TXT 记录,导致认证失败。
虽然 cert-manager 提供了这个参数 cnameStrategy: None ,能够在声明 ISSUE 时使用,但是似乎大部分实现的 webhook 都没有实现这个特性:
CodeBlock Loading...
目前临时的解决办法,只能是 避免 cert-manager 托管域名能够解析到 CNAME 记录,等有空了研究一下 cert-manager 和 webhook 的实现方法,看能否解决这个问题。