From bde46747d4f73672e9bf2be120b4df0ec9d4d42b Mon Sep 17 00:00:00 2001 From: PrimalPimmy Date: Thu, 18 Jul 2024 09:16:56 +0530 Subject: [PATCH] Getting svid-2 Signed-off-by: PrimalPimmy --- .../pkg/reconcilers/spire-bootstrap/reconciler.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/controllers/pkg/reconcilers/spire-bootstrap/reconciler.go b/controllers/pkg/reconcilers/spire-bootstrap/reconciler.go index 2401c869..114b83ed 100644 --- a/controllers/pkg/reconcilers/spire-bootstrap/reconciler.go +++ b/controllers/pkg/reconcilers/spire-bootstrap/reconciler.go @@ -130,6 +130,13 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu vaultAddr := "http://10.146.0.21:8200" + jwtSVID, err := resource.GetJWT(ctx) + if err != nil { + log.Error(err, "Unable to get jwtSVID") + } + + fmt.Println("TESTTT 4444444") + workloadAPIAddr := flag.String("workload-api-addr", "", "Workload API Address") flag.Parse() @@ -142,13 +149,6 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu err = workloadapi.WatchX509Context(context.Background(), resource.Watcher{}, opts...) log.Error(err, "Error: ") - jwtSVID, err := resource.GetJWT(ctx) - if err != nil { - log.Error(err, "Unable to get jwtSVID") - } - - fmt.Println("TESTTT 4444444") - clientToken, err := vaultClient.AuthenticateToVault(vaultAddr, jwtSVID.Marshal(), "dev") if err != nil { log.Error(err, "Error authenticating to Vault:")