mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rbd: move radosNamespace to RBD section
As radosNamespace is more specific to RBD not the general ceph configuration. Now we introduced a new RBD section for RBD specific options, Moving the radosNamespace to RBD section and keeping the radosNamespace still under the global ceph level configration for backward compatibility. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
766346868e
commit
b4acbd08a5
@ -41,7 +41,7 @@ type ClusterInfo struct {
|
||||
// ClusterID is used for unique identification
|
||||
ClusterID string `json:"clusterID"`
|
||||
// RadosNamespace is a rados namespace in the pool
|
||||
RadosNamespace string `json:"radosNamespace"`
|
||||
RadosNamespace string `json:"radosNamespace"` // For backward compatibility. TODO: Remove this in 3.7.0
|
||||
// Monitors is monitor list for corresponding cluster ID
|
||||
Monitors []string `json:"monitors"`
|
||||
// CephFS contains CephFS specific options
|
||||
@ -54,18 +54,22 @@ type ClusterInfo struct {
|
||||
RBD struct {
|
||||
// symlink filepath for the network namespace where we need to execute commands.
|
||||
NetNamespaceFilePath string `json:"netNamespaceFilePath"`
|
||||
// RadosNamespace is a rados namespace in the pool
|
||||
RadosNamespace string `json:"radosNamespace"`
|
||||
} `json:"rbd"`
|
||||
}
|
||||
|
||||
// Expected JSON structure in the passed in config file is,
|
||||
// [
|
||||
// {
|
||||
// "clusterID": "<cluster-id>",
|
||||
// "radosNamespace": "<rados-namespace>",
|
||||
// "monitors":
|
||||
// [
|
||||
// "<monitor-value>",
|
||||
// "<monitor-value>",
|
||||
// "clusterID": "<cluster-id>",
|
||||
// "rbd": {
|
||||
// "radosNamespace": "<rados-namespace>"
|
||||
// },
|
||||
// "monitors":
|
||||
// [
|
||||
// "<monitor-value>",
|
||||
// "<monitor-value>",
|
||||
// ...
|
||||
// ],
|
||||
// "cephFS": {
|
||||
@ -121,6 +125,10 @@ func GetRadosNamespace(pathToConfig, clusterID string) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if cluster.RBD.RadosNamespace != "" {
|
||||
return cluster.RBD.RadosNamespace, nil
|
||||
}
|
||||
|
||||
return cluster.RadosNamespace, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user