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

@ -35,4 +35,4 @@ func TestNewCSIConfigMapYAML(t *testing.T) {
require.NoError(t, err)
require.NotEqual(t, "", yaml)
}
}

View File

@ -18,42 +18,42 @@ package kubernetes
type ClusterInfo struct {
// ClusterID is used for unique identification
ClusterID string
ClusterID string `json:"clusterID"`
// Monitors is monitor list for corresponding cluster ID
Monitors []string
Monitors []string `json:"monitors"`
// CephFS contains CephFS specific options
CephFS CephFS
CephFS CephFS `json:"cephFS"`
// RBD Contains RBD specific options
RBD RBD
RBD RBD `json:"rbd"`
// NFS contains NFS specific options
NFS NFS
NFS NFS `json:"nfs"`
// Read affinity map options
ReadAffinity ReadAffinity
ReadAffinity ReadAffinity `json:"readAffinity"`
}
type CephFS struct {
// symlink filepath for the network namespace where we need to execute commands.
NetNamespaceFilePath string
NetNamespaceFilePath string `json:"netNamespaceFilePath"`
// SubvolumeGroup contains the name of the SubvolumeGroup for CSI volumes
SubvolumeGroup string
SubvolumeGroup string `json:"subvolumeGroup"`
// KernelMountOptions contains the kernel mount options for CephFS volumes
KernelMountOptions string
KernelMountOptions string `json:"kernelMountOptions"`
// FuseMountOptions contains the fuse mount options for CephFS volumes
FuseMountOptions string
FuseMountOptions string `json:"fuseMountOptions"`
}
type RBD struct {
// symlink filepath for the network namespace where we need to execute commands.
NetNamespaceFilePath string
NetNamespaceFilePath string `json:"netNamespaceFilePath"`
// RadosNamespace is a rados namespace in the pool
RadosNamespace string
RadosNamespace string `json:"radosNamespace"`
}
type NFS struct {
// symlink filepath for the network namespace where we need to execute commands.
NetNamespaceFilePath string
NetNamespaceFilePath string `json:"netNamespaceFilePath"`
}
type ReadAffinity struct {
Enabled bool
CrushLocationLabels []string
Enabled bool `json:"enabled"`
CrushLocationLabels []string `json:"crushLocationLabels"`
}