diff --git a/docs/content/https/acme.md b/docs/content/https/acme.md index 62509b32c..44a53641f 100644 --- a/docs/content/https/acme.md +++ b/docs/content/https/acme.md @@ -617,6 +617,7 @@ It defaults to `2160` (90 days) to follow Let's Encrypt certificates' duration. |----------------------|-------------------|-------------------------| | >= 1 year | 4 months | 1 week | | >= 90 days | 30 days | 1 day | +| >= 30 days | 10 days | 12 hours | | >= 7 days | 1 day | 1 hour | | >= 24 hours | 6 hours | 10 min | | < 24 hours | 20 min | 1 min | diff --git a/pkg/provider/acme/provider.go b/pkg/provider/acme/provider.go index 34f5e12d7..7df870c59 100644 --- a/pkg/provider/acme/provider.go +++ b/pkg/provider/acme/provider.go @@ -696,6 +696,8 @@ func getCertificateRenewDurations(certificatesDuration int) (time.Duration, time return 4 * 30 * 24 * time.Hour, 7 * 24 * time.Hour // 4 month, 1 week case certificatesDuration >= 3*30*24: // >= 90 days return 30 * 24 * time.Hour, 24 * time.Hour // 30 days, 1 day + case certificatesDuration >= 30*24: // >= 30 days + return 10 * 24 * time.Hour, 12 * time.Hour // 10 days, 12 hours case certificatesDuration >= 7*24: // >= 7 days return 24 * time.Hour, time.Hour // 1 days, 1 hour case certificatesDuration >= 24: // >= 1 days diff --git a/pkg/provider/acme/provider_test.go b/pkg/provider/acme/provider_test.go index 0285e5d74..cf3d8d397 100644 --- a/pkg/provider/acme/provider_test.go +++ b/pkg/provider/acme/provider_test.go @@ -613,6 +613,12 @@ func Test_getCertificateRenewDurations(t *testing.T) { expectRenewPeriod: time.Hour * 24 * 30, expectRenewInterval: time.Hour * 24, }, + { + desc: "30 Days certificates: 10 days renew period, 12 hour renew interval", + certificatesDurations: 24 * 30, + expectRenewPeriod: time.Hour * 24 * 10, + expectRenewInterval: time.Hour * 12, + }, { desc: "7 Days certificates: 1 days renew period, 1 hour renew interval", certificatesDurations: 24 * 7,