|
|
@@ -197,7 +197,7 @@ func (sm *ProviderGCP) GetSecretMap(ctx context.Context, ref esv1alpha1.External
|
|
|
return nil, err
|
|
|
}
|
|
|
|
|
|
- kv := make(map[string]string)
|
|
|
+ kv := make(map[string]json.RawMessage)
|
|
|
err = json.Unmarshal(data, &kv)
|
|
|
if err != nil {
|
|
|
return nil, fmt.Errorf(errJSONSecretUnmarshal, err)
|
|
|
@@ -205,7 +205,13 @@ func (sm *ProviderGCP) GetSecretMap(ctx context.Context, ref esv1alpha1.External
|
|
|
|
|
|
secretData := make(map[string][]byte)
|
|
|
for k, v := range kv {
|
|
|
- secretData[k] = []byte(v)
|
|
|
+ var strVal string
|
|
|
+ err = json.Unmarshal(v, &strVal)
|
|
|
+ if err == nil {
|
|
|
+ secretData[k] = []byte(strVal)
|
|
|
+ } else {
|
|
|
+ secretData[k] = v
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return secretData, nil
|