diff --git a/plugins/secrets/vault/kubernetes.go b/plugins/secrets/vault/kubernetes.go index ca23021d..be5d8ed0 100644 --- a/plugins/secrets/vault/kubernetes.go +++ b/plugins/secrets/vault/kubernetes.go @@ -43,5 +43,9 @@ func getKubernetesToken(addr, role, mountPoint, tokenFile string) (string, time. } ttl, err := time.ParseDuration(resp.Auth.Lease) + if err != nil { + return "", 0, err + } + return resp.Auth.Token, ttl, nil }