2023-11-22 14:29:25 +00:00
|
|
|
/*
|
|
|
|
Copyright 2023 The Ceph-CSI Authors.
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
package kubernetes
|
|
|
|
|
|
|
|
type ClusterInfo struct {
|
|
|
|
// ClusterID is used for unique identification
|
2023-12-18 11:04:31 +00:00
|
|
|
ClusterID string `json:"clusterID"`
|
2023-11-22 14:29:25 +00:00
|
|
|
// Monitors is monitor list for corresponding cluster ID
|
2023-12-18 11:04:31 +00:00
|
|
|
Monitors []string `json:"monitors"`
|
2023-11-22 14:29:25 +00:00
|
|
|
// CephFS contains CephFS specific options
|
2023-12-18 11:04:31 +00:00
|
|
|
CephFS CephFS `json:"cephFS"`
|
2023-11-22 14:29:25 +00:00
|
|
|
// RBD Contains RBD specific options
|
2023-12-18 11:04:31 +00:00
|
|
|
RBD RBD `json:"rbd"`
|
2023-11-22 14:29:25 +00:00
|
|
|
// NFS contains NFS specific options
|
2023-12-18 11:04:31 +00:00
|
|
|
NFS NFS `json:"nfs"`
|
2023-11-22 14:29:25 +00:00
|
|
|
// Read affinity map options
|
2023-12-18 11:04:31 +00:00
|
|
|
ReadAffinity ReadAffinity `json:"readAffinity"`
|
2023-11-22 14:29:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type CephFS struct {
|
|
|
|
// symlink filepath for the network namespace where we need to execute commands.
|
2023-12-18 11:04:31 +00:00
|
|
|
NetNamespaceFilePath string `json:"netNamespaceFilePath"`
|
2023-11-22 14:29:25 +00:00
|
|
|
// SubvolumeGroup contains the name of the SubvolumeGroup for CSI volumes
|
2023-12-18 11:04:31 +00:00
|
|
|
SubvolumeGroup string `json:"subvolumeGroup"`
|
2023-11-22 14:29:25 +00:00
|
|
|
// KernelMountOptions contains the kernel mount options for CephFS volumes
|
2023-12-18 11:04:31 +00:00
|
|
|
KernelMountOptions string `json:"kernelMountOptions"`
|
2023-11-22 14:29:25 +00:00
|
|
|
// FuseMountOptions contains the fuse mount options for CephFS volumes
|
2023-12-18 11:04:31 +00:00
|
|
|
FuseMountOptions string `json:"fuseMountOptions"`
|
2023-11-22 14:29:25 +00:00
|
|
|
}
|
|
|
|
type RBD struct {
|
|
|
|
// symlink filepath for the network namespace where we need to execute commands.
|
2023-12-18 11:04:31 +00:00
|
|
|
NetNamespaceFilePath string `json:"netNamespaceFilePath"`
|
2023-11-22 14:29:25 +00:00
|
|
|
// RadosNamespace is a rados namespace in the pool
|
2023-12-18 11:04:31 +00:00
|
|
|
RadosNamespace string `json:"radosNamespace"`
|
2024-04-23 11:18:14 +00:00
|
|
|
// RBD mirror daemons running in the ceph cluster.
|
|
|
|
MirrorDaemonCount int `json:"mirrorDaemonCount"`
|
2023-11-22 14:29:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type NFS struct {
|
|
|
|
// symlink filepath for the network namespace where we need to execute commands.
|
2023-12-18 11:04:31 +00:00
|
|
|
NetNamespaceFilePath string `json:"netNamespaceFilePath"`
|
2023-11-22 14:29:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type ReadAffinity struct {
|
2023-12-18 11:04:31 +00:00
|
|
|
Enabled bool `json:"enabled"`
|
|
|
|
CrushLocationLabels []string `json:"crushLocationLabels"`
|
2023-11-22 14:29:25 +00:00
|
|
|
}
|