Skip to content

Commit

Permalink
Fix for harness#2541
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrydzewski authored Dec 6, 2018
1 parent 768ed78 commit 6d144de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/secrets/vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,14 @@ func (v *vault) renewLoop() {

logrus.Debugf("vault: refreshing token: increment %v", v.ttl)
_, err := v.client.Auth().Token().RenewSelf(incr)

// kubernetes tokens have a max age of 32 days. If the
// token cannot be refreshed we may need to generate a
// new token.
if err != nil && v.auth == "kubernetes" {
err = v.initKubernetes()
}

if err != nil {
logrus.Errorf("vault: refreshing token failed: %s", err)
} else {
Expand Down

0 comments on commit 6d144de

Please sign in to comment.