mirror of
https://github.com/coredns/coredns.git
synced 2026-01-06 08:51:20 -05:00
sign: add expiration jitter (#3588)
* add expiration jitter Signed-off-by: Miek Gieben <miek@miek.nl> * sign: add expiration jitter This PR adds a expiration jitter to spread out zone re-signing even more. The max is 5 extra days added when creating the signer for a specific zone. Also make the duration* constants private to clean up the godoc for this plugin. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
@@ -26,12 +26,13 @@ func (s *Sign) OnStartup() error {
|
||||
|
||||
// Various duration constants for signing of the zones.
|
||||
const (
|
||||
DurationExpireDays = 7 * 24 * time.Hour // max time allowed before expiration
|
||||
DurationResignDays = 6 * 24 * time.Hour // if the last sign happenend this long ago, sign again
|
||||
DurationSignatureExpireDays = 32 * 24 * time.Hour // sign for 32 days
|
||||
DurationRefreshHours = 5 * time.Hour // check zones every 5 hours
|
||||
DurationJitter = -18 * time.Hour // default max jitter
|
||||
DurationSignatureInceptionHours = -3 * time.Hour // -(2+1) hours, be sure to catch daylight saving time and such, jitter is subtracted
|
||||
durationExpireDays = 7 * 24 * time.Hour // max time allowed before expiration
|
||||
durationResignDays = 6 * 24 * time.Hour // if the last sign happenend this long ago, sign again
|
||||
durationSignatureExpireDays = 32 * 24 * time.Hour // sign for 32 days
|
||||
durationRefreshHours = 5 * time.Hour // check zones every 5 hours
|
||||
durationInceptionJitter = -18 * time.Hour // default max jitter for the inception
|
||||
durationExpirationDayJitter = 5 * 24 * time.Hour // default max jitter for the expiration
|
||||
durationSignatureInceptionHours = -3 * time.Hour // -(2+1) hours, be sure to catch daylight saving time and such, jitter is subtracted
|
||||
)
|
||||
|
||||
const timeFmt = "2006-01-02T15:04:05.000Z07:00"
|
||||
|
||||
Reference in New Issue
Block a user