Reduce token renewal interval in case of errors (#49)
By default, token renewals take place after 50% of the token TTL have passed. In certain scenarios this would lead to only having a single chance to renew the token successfully before it would expire. In case of an error we will retry to renew the token after 30 seconds.
Parameterize token renewal intervals (#50)
For particular Vault setups, the default values for token renewals might not be a good fit. So that the time between a successful or failed token renewal and the next renewal attempt can be controlled via optional environment variables.
VAULT_TOKEN_RENEWAL_INTERVAL
: The time (in seconds) between a successful token renewal and the next renewal attempt. Default: 50% of the token lease durationVAULT_TOKEN_RENEWAL_RETRY_INTERVAL
: The time (in seconds) between a failed token renewal and the next renewal attempt. Default: 30 seconds
Thanks to @moertel for her contribution.