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:
Praveen M
2023-12-18 16:34:31 +05:30
committed by mergify[bot]
parent 35f034f156
commit 50e505619c
10 changed files with 74 additions and 124 deletions

View File

@ -26,6 +26,7 @@ import (
"github.com/container-storage-interface/spec/lib/go/csi"
cephcsi "github.com/ceph/ceph-csi/api/deploy/kubernetes"
"github.com/ceph/ceph-csi/internal/cephfs/core"
cerrors "github.com/ceph/ceph-csi/internal/cephfs/errors"
fsutil "github.com/ceph/ceph-csi/internal/cephfs/util"
@ -164,7 +165,7 @@ func extractMounter(dest *string, options map[string]string) error {
return nil
}
func GetClusterInformation(options map[string]string) (*util.ClusterInfo, error) {
func GetClusterInformation(options map[string]string) (*cephcsi.ClusterInfo, error) {
clusterID, ok := options["clusterID"]
if !ok {
err := fmt.Errorf("clusterID must be set")
@ -189,7 +190,7 @@ func GetClusterInformation(options map[string]string) (*util.ClusterInfo, error)
return nil, err
}
clusterData := &util.ClusterInfo{
clusterData := &cephcsi.ClusterInfo{
ClusterID: clusterID,
Monitors: strings.Split(monitors, ","),
}