mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 02:50:30 +00:00
util: use ConfigMap.Data instead of .BinaryData
When using .BinaryData, the contents of the configuration is not parsed correctly. Whereas the parsing works fine whet .Data is used. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
9e957520ae
commit
d0f054bb6c
@ -135,9 +135,9 @@ func getKMSConfigMap() (map[string]interface{}, error) {
|
||||
|
||||
// convert cm.Data from map[string]interface{}
|
||||
kmsConfig := make(map[string]interface{})
|
||||
for kmsID, data := range cm.BinaryData {
|
||||
for kmsID, data := range cm.Data {
|
||||
section := make(map[string]interface{})
|
||||
err = json.Unmarshal(data, §ion)
|
||||
err = json.Unmarshal([]byte(data), §ion)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not convert contents "+
|
||||
"of %q to s config section", kmsID)
|
||||
|
Loading…
Reference in New Issue
Block a user