Skip to content

Commit

Permalink
Reversing some changes
Browse files Browse the repository at this point in the history
Signed-off-by: PrimalPimmy <Prashant20.pm@gmail.com>
  • Loading branch information
PrimalPimmy committed Jul 2, 2024
1 parent 4bd459f commit 3d22a0c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion controllers/pkg/reconcilers/spire-bootstrap/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package bootstrapsecret
import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
Expand Down Expand Up @@ -209,7 +210,17 @@ func (r *reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Resu
log.Error(err, "Error retrieving secret:")
}

fmt.Printf("Secret retrieved: %v\n", kubeconfig)
var decodedBytes []byte

if encodedValue, ok := kubeconfig["test"].(string); ok {
// Decode the base64 encoded value
decodedBytes, err = base64.StdEncoding.DecodeString(encodedValue)
if err != nil {
fmt.Println("Error decoding base64:", err)
}
}

fmt.Printf("Secret retrieved: %v\n", decodedBytes)

return reconcile.Result{}, nil
}
Expand Down

0 comments on commit 3d22a0c

Please sign in to comment.