Skip to content

Commit 62fda52

Browse files
committed
make tokens renew for 1 week instead of exactly 1 day
The renew timer runs every 24 hours, so renewing for 24 hours leaves no margin of error which results in tokens failing to renew randomly.
1 parent f437372 commit 62fda52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

service/service.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,13 @@ func (app *App) Start() (final error) {
101101
zap.Error(e))
102102

103103
case <-renew.C:
104-
_, e := app.vault.Auth().Token().RenewSelf(86400)
104+
s, e := app.vault.Auth().Token().RenewSelf(604800)
105105
if e != nil {
106106
zap.L().Error("failed to renew vault token",
107107
zap.Error(e))
108108
}
109+
zap.L().Debug("successfully renewed vault token",
110+
zap.Any("object", s))
109111
}
110112
return
111113
}

0 commit comments

Comments
 (0)