Skip to content

Commit

Permalink
use secret bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
EladLeev committed Aug 24, 2024
1 parent 737445e commit 9f744a1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/kubeseal-convert/handlers/kubesealconvert/kubeseal.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,14 @@ func (*KubesealImpl) RawSeal(secretValues domain.SecretValues) {

kubesealBinary := checkKubesealBinary()

secretData, err := json.Marshal(secretValues.Data)
if err != nil {
log.Fatalf("Failed to marshal secret data: %v", err)
dataBytes := buildDataBytes(secretValues)
if len(dataBytes) != 1 {
log.Fatalf("Raw seal failed: expected 1 byte array, got %d", len(dataBytes))
}
var secretData []byte
for _, v := range dataBytes {
secretData = v
break
}

args := []string{"--raw"}
Expand Down

0 comments on commit 9f744a1

Please sign in to comment.