From 9e38640baef7f5cb7fa3d751bc0e56fd7997a399 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Tue, 3 Oct 2017 15:53:55 -0500 Subject: [PATCH 1/2] Make default grace period match Vault's default, this makes it so users are not surprised by continous renewals on TTLs lower than 5 minutes (the previous default). --- config/vault.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/vault.go b/config/vault.go index 6a051c0a4..9a0cb7c11 100644 --- a/config/vault.go +++ b/config/vault.go @@ -11,7 +11,7 @@ const ( // DefaultVaultGrace is the default grace period before which to read a new // secret from Vault. If a lease is due to expire in 5 minutes, Consul // Template will read a new secret at that time minus this value. - DefaultVaultGrace = 5 * time.Minute + DefaultVaultGrace = 15 * time.Second // DefaultVaultRenewToken is the default value for if the Vault token should // be renewed. From ac97fc06db474cfc9dd6c69d8e22d02bd56892cc Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Tue, 3 Oct 2017 16:24:49 -0500 Subject: [PATCH 2/2] Correct comment to reflect update in vault grace period --- config/vault.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/vault.go b/config/vault.go index 9a0cb7c11..c5c1b32f2 100644 --- a/config/vault.go +++ b/config/vault.go @@ -9,7 +9,7 @@ import ( const ( // DefaultVaultGrace is the default grace period before which to read a new - // secret from Vault. If a lease is due to expire in 5 minutes, Consul + // secret from Vault. If a lease is due to expire in 15 seconds, Consul // Template will read a new secret at that time minus this value. DefaultVaultGrace = 15 * time.Second