From d67599452c1d4e485e8772040df176bdc2f9fe44 Mon Sep 17 00:00:00 2001 From: Andika Ahmad Ramadhan Date: Sun, 19 Nov 2023 22:32:18 +0700 Subject: [PATCH] fix: safely parse renewable field from vault response Signed-off-by: Andika Ahmad Ramadhan --- pkg/scaling/resolver/hashicorpvault_handler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/scaling/resolver/hashicorpvault_handler.go b/pkg/scaling/resolver/hashicorpvault_handler.go index 67427feb571..49a7cffe86a 100644 --- a/pkg/scaling/resolver/hashicorpvault_handler.go +++ b/pkg/scaling/resolver/hashicorpvault_handler.go @@ -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) }