From 3081eabba520605afb3d153b58b3d3a06b1ad3e3 Mon Sep 17 00:00:00 2001 From: Mehdy Khoshnoody Date: Mon, 1 Jun 2020 18:45:04 +0430 Subject: [PATCH] doc: Add rados namespace to option to csi-configs A minimal documentation on how to use a rados namespace with rbd. Signed-off-by: Mehdy Khoshnoody --- examples/csi-config-map-sample.yaml | 7 +++++++ internal/util/csiconfig.go | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/csi-config-map-sample.yaml b/examples/csi-config-map-sample.yaml index 1ec7e304ab6..b8d72941741 100644 --- a/examples/csi-config-map-sample.yaml +++ b/examples/csi-config-map-sample.yaml @@ -12,6 +12,12 @@ kind: ConfigMap # each such cluster in use. # To add more clusters or edit MON addresses in an existing configmap, use # the `kubectl replace` command. +# The is optional and represents a radosNamespace in the pool. +# If any given all the of the rbd images, snapshots and other metadata +# will be store within the radosNamespace. +# NOTE: The given radosNamespace must already exists in the pool. +# NOTE: Make sure you don't add radosNamespace option to a currently in use +# configuration as it will cause issues. # The field "cephFS.subvolumeGroup" is optional and defaults to "csi". # NOTE: Changes to the configmap is automatically updated in the running pods, # thus restarting existing pods using the configmap is NOT required on edits @@ -21,6 +27,7 @@ data: [ { "clusterID": "", + "radosNamespace": "", "monitors": [ "", "", diff --git a/internal/util/csiconfig.go b/internal/util/csiconfig.go index d0bfb1b4c0c..fee2f6cfadd 100644 --- a/internal/util/csiconfig.go +++ b/internal/util/csiconfig.go @@ -37,7 +37,7 @@ const ( type ClusterInfo struct { // ClusterID is used for unique identification ClusterID string `json:"clusterID"` - // Namespace is the namespace in the pool + // RadosNamespace is a rados namespace in the pool RadosNamespace string `json:"radosNamespace"` // Monitors is monitor list for corresponding cluster ID Monitors []string `json:"monitors"` @@ -52,7 +52,7 @@ type ClusterInfo struct { // [ // { // "clusterID": "", -// "namespace": "", +// "radosNamespace": "", // "monitors": // [ // "",