Fix acme renew
This commit is contained in:
parent
0c1e06199c
commit
7bf5d557c1
1 changed files with 8 additions and 6 deletions
14
acme/acme.go
14
acme/acme.go
|
@ -136,12 +136,14 @@ func (a *ACME) CreateClusterConfig(leadership *cluster.Leadership, tlsConfig *tl
|
||||||
leadership.Pool.AddGoCtx(func(ctx context.Context) {
|
leadership.Pool.AddGoCtx(func(ctx context.Context) {
|
||||||
log.Infof("Starting ACME renew job...")
|
log.Infof("Starting ACME renew job...")
|
||||||
defer log.Infof("Stopped ACME renew job...")
|
defer log.Infof("Stopped ACME renew job...")
|
||||||
select {
|
for {
|
||||||
case <-ctx.Done():
|
select {
|
||||||
return
|
case <-ctx.Done():
|
||||||
case <-ticker.C:
|
return
|
||||||
if err := a.renewCertificates(); err != nil {
|
case <-ticker.C:
|
||||||
log.Errorf("Error renewing ACME certificate: %s", err.Error())
|
if err := a.renewCertificates(); err != nil {
|
||||||
|
log.Errorf("Error renewing ACME certificate: %s", err.Error())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue