Refactor certmanager to worker service

Replace the Provisioner and Renewer with poll-based provision and renew
workers orchestrated by a certmanager Service. Certificate operations are
now hostname-centric and driven by the certificates table, decoupled from
custom-domain business logic.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-07-10 15:10:19 +02:00
parent 7c5759733c
commit b524e9b497
9 changed files with 1115 additions and 734 deletions

View File

@@ -84,16 +84,16 @@ func (h *ACMEChallengeHandler) getKeyAuthForToken(ctx context.Context, token str
err := h.pg.WithConn(
ctx,
func(ctx context.Context, conn pg.Querier) error {
domain := &coredata.CustomDomain{}
if err := domain.LoadByHTTPChallengeToken(ctx, conn, coredata.NewNoScope(), token); err != nil {
certificate := &coredata.Certificate{}
if err := certificate.LoadByHTTPChallengeToken(ctx, conn, coredata.NewNoScope(), token); err != nil {
return err
}
if domain.HTTPChallengeKeyAuth == nil {
if certificate.HTTPChallengeKeyAuth == nil {
return http.ErrNotSupported
}
keyAuth = *domain.HTTPChallengeKeyAuth
keyAuth = *certificate.HTTPChallengeKeyAuth
return nil
},