Skip to content

Commit

Permalink
Merge pull request #16 from numberly/token-not-renewed-correctly
Browse files Browse the repository at this point in the history
fix(token-was-not-correctly-renewed-for-the-renewer-and-revoker): use…
  • Loading branch information
SoulKyu committed Jun 3, 2024
2 parents 80df666 + af5921f commit 5eb599f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/vault/handle_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,11 @@ func (c *Connector) StartTokenRenewal(ctx context.Context, cfg *config.Config) {
c.Log.Errorf("Failed to renew Vault token: %v", err)
c.Log.Info("Trying to reconnect to Vault")
newConn, err := ConnectToVault(ctx, cfg)
c.K8sSaVaultToken = newConn.K8sSaVaultToken
if err != nil {
c.Log.Fatalf("Can't reconnect to VAULT: %v", err)
}
c.K8sSaVaultToken = newConn.K8sSaVaultToken
c.SetToken(newConn.K8sSaVaultToken)
}
c.Log.Debug("Token has been renewed succefully !")
}
Expand Down

0 comments on commit 5eb599f

Please sign in to comment.