Skip to content

Commit

Permalink
fix golangci-lint
Browse files Browse the repository at this point in the history
Signed-off-by: Arvindh <[email protected]>
  • Loading branch information
arvindh123 committed Feb 19, 2024
1 parent 5650ae7 commit f99ec6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions certs/pki/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (p *pkiAgent) LoginAndRenew(ctx context.Context) error {
p.logger.Info("pki login and renew function stopping")
return nil
default:
err := p.login()
err := p.login(ctx)
if err != nil {
p.logger.Info("unable to authenticate to Vault", slog.Any("error", err))
time.Sleep(5 * time.Second)
Expand All @@ -208,7 +208,7 @@ func (p *pkiAgent) LoginAndRenew(ctx context.Context) error {
}
}

func (p *pkiAgent) login() error {
func (p *pkiAgent) login(ctx context.Context) error {
secretID := &approle.SecretID{FromString: p.appSecret}

authMethod, err := approle.NewAppRoleAuth(
Expand All @@ -221,7 +221,7 @@ func (p *pkiAgent) login() error {
if len(p.namespace) > 0 {
p.client.SetNamespace(p.namespace)
}
secret, err := p.client.Auth().Login(context.Background(), authMethod)
secret, err := p.client.Auth().Login(ctx, authMethod)
if err != nil {
return errors.Wrap(errFailedToLogin, err)
}
Expand Down

0 comments on commit f99ec6f

Please sign in to comment.