Skip to content

Commit

Permalink
vaultAuth by switching
Browse files Browse the repository at this point in the history
  • Loading branch information
luanphantiki committed Sep 21, 2021
1 parent a50e05a commit 74d7799
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ func main() {

for {
if snapshotter.TokenExpiration.Before(time.Now()) {
if c.VaultAuthMethod == "k8s" {
switch c.VaultAuthMethod {
case "k8s":
snapshotter.SetClientTokenFromK8sAuth(c)
default:
snapshotter.SetClientTokenFromAppRole(c)
}
snapshotter.SetClientTokenFromAppRole(c)
}
leader, err := snapshotter.API.Sys().Leader()
if err != nil {
Expand Down

0 comments on commit 74d7799

Please sign in to comment.