Skip to content

Commit

Permalink
fix: safely parse renewable field from vault response
Browse files Browse the repository at this point in the history
Signed-off-by: Andika Ahmad Ramadhan <andikahmadr@gmail.com>
  • Loading branch information
kmdrn7 committed Nov 19, 2023
1 parent 5211cda commit d675994
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/scaling/resolver/hashicorpvault_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ func (vh *HashicorpVaultHandler) Initialize(logger logr.Logger) error {
return err
}

renew := lookup.Data["renewable"].(bool)
if renew {
if renew, ok := lookup.Data["renewable"].(bool); ok && renew {
vh.stopCh = make(chan struct{})
go vh.renewToken(logger)
}
Expand Down

0 comments on commit d675994

Please sign in to comment.