mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +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:
@ -24,10 +24,10 @@ 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/mounter"
|
||||
"github.com/ceph/ceph-csi/internal/cephfs/store"
|
||||
csicommon "github.com/ceph/ceph-csi/internal/csi-common"
|
||||
"github.com/ceph/ceph-csi/internal/util"
|
||||
)
|
||||
|
||||
func Test_setMountOptions(t *testing.T) {
|
||||
@ -39,17 +39,17 @@ func Test_setMountOptions(t *testing.T) {
|
||||
configKernelMountOptions := "crc"
|
||||
configFuseMountOptions := "allow_other"
|
||||
|
||||
csiConfig := []util.ClusterInfo{
|
||||
csiConfig := []cephcsi.ClusterInfo{
|
||||
{
|
||||
ClusterID: "cluster-1",
|
||||
CephFS: util.CephFS{
|
||||
CephFS: cephcsi.CephFS{
|
||||
KernelMountOptions: configKernelMountOptions,
|
||||
FuseMountOptions: configFuseMountOptions,
|
||||
},
|
||||
},
|
||||
{
|
||||
ClusterID: "cluster-2",
|
||||
CephFS: util.CephFS{
|
||||
CephFS: cephcsi.CephFS{
|
||||
KernelMountOptions: "",
|
||||
FuseMountOptions: "",
|
||||
},
|
||||
|
@ -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, ","),
|
||||
}
|
||||
|
Reference in New Issue
Block a user