mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
deploy: added json field tags for csi config map
This commit adds the json field tags for csi config map for encoding and decoding JSON. Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
@ -21,7 +21,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/ceph/ceph-csi/internal/util"
|
||||
cephcsi "github.com/ceph/ceph-csi/api/deploy/kubernetes"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
apierrs "k8s.io/apimachinery/pkg/api/errors"
|
||||
@ -54,19 +54,13 @@ func createConfigMap(pluginPath string, c kubernetes.Interface, f *framework.Fra
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
conmap := []util.ClusterInfo{{
|
||||
conmap := []cephcsi.ClusterInfo{{
|
||||
ClusterID: fsID,
|
||||
Monitors: mons,
|
||||
RBD: struct {
|
||||
NetNamespaceFilePath string `json:"netNamespaceFilePath"`
|
||||
RadosNamespace string `json:"radosNamespace"`
|
||||
}{
|
||||
RBD: cephcsi.RBD{
|
||||
RadosNamespace: radosNamespace,
|
||||
},
|
||||
ReadAffinity: struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
CrushLocationLabels []string `json:"crushLocationLabels"`
|
||||
}{
|
||||
ReadAffinity: cephcsi.ReadAffinity{
|
||||
Enabled: true,
|
||||
CrushLocationLabels: []string{
|
||||
crushLocationRegionLabel,
|
||||
@ -123,7 +117,7 @@ func createCustomConfigMap(
|
||||
for key := range clusterInfo {
|
||||
clusterID = append(clusterID, key)
|
||||
}
|
||||
conmap := make([]util.ClusterInfo, len(clusterID))
|
||||
conmap := make([]cephcsi.ClusterInfo, len(clusterID))
|
||||
|
||||
for i, j := range clusterID {
|
||||
conmap[i].ClusterID = j
|
||||
|
Reference in New Issue
Block a user