Skip to content

Commit

Permalink
Change comment
Browse files Browse the repository at this point in the history
  • Loading branch information
divyaac committed Apr 26, 2024
1 parent e5ff6ee commit 9fc4507
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dependency/vault_pki.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func goodFor(cert *x509.Certificate) (time.Duration, bool) {
r := rand.New(rand.NewSource(time.Now().UnixNano()))
lifespanMilliseconds := lifespanDur.Milliseconds()
// calculate the 'time the certificate should be rotated' by figuring out -3%
// - 2% + VaultLeaseRenewalThreshold of the lifespan and adding it to the
// +3% + VaultLeaseRenewalThreshold of the lifespan and adding it to the
// start
rotationTime := start.Add(time.Millisecond * time.Duration(
float64(lifespanMilliseconds)*VaultLeaseRenewalThreshold+float64(lifespanMilliseconds*(int64(r.Intn(6)-3)/100.0)),
Expand Down

0 comments on commit 9fc4507

Please sign in to comment.