We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consul-template -v consul-template v0.32.0 (a9261315)
PKI certificate should be reload at least 87% of lifespan in vault_pki#goodfor function.
If jitter output minus result, it may let the watcher sleep again after first awake. For example:
First we issue a 24hr certificate and start calculate goodfor value, the four variables inside function will be:
goodfor
lifespan := "24h" duration := "24h" // since we calculate after issuing it gooddur := "24h * 0.9" = "21.6h" mindur := "2.4h"
if we assume jitter output 87% of duration:
gooddur = "24h * 0.87" = "20.88h"
Now the watcher will start sleep for 20.88 hours and after it wake up and start calculate the goodfor again:
lifespan := "24h" duration := "24h - 20.88h" = "3.12h" gooddur := "3.12h * 0.9" = "2.808h" mindur := "2.4h"
this time gooddur is still greater than mindur which causing sleep again!
gooddur
mindur
The third time calculation will cause reloaded time really close to expiration time.
Calculate midur to 0.87 * lifespace.
midur
0.87 * lifespace
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Consul Template version
Expected behavior
PKI certificate should be reload at least 87% of lifespan in vault_pki#goodfor function.
Actual behavior
If jitter output minus result, it may let the watcher sleep again after first awake. For example:
First we issue a 24hr certificate and start calculate
goodfor
value, the four variables inside function will be:if we assume jitter output 87% of duration:
Now the watcher will start sleep for 20.88 hours and after it wake up and start calculate the
goodfor
again:this time
gooddur
is still greater thanmindur
which causing sleep again!The third time calculation will cause reloaded time really close to expiration time.
Solution
Calculate
midur
to0.87 * lifespace
.The text was updated successfully, but these errors were encountered: