mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rbd: add capability to automatically enable read affinity
This commit makes use of crush location labels from node labels to supply `crush_location` and `read_from_replica=localize` options during rbd map cmd. Using these options, ceph will be able to redirect reads to the closest OSD, improving performance. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
@ -79,8 +79,15 @@ func init() {
|
||||
&conf.DomainLabels,
|
||||
"domainlabels",
|
||||
"",
|
||||
"list of kubernetes node labels, that determines the topology"+
|
||||
"list of Kubernetes node labels, that determines the topology"+
|
||||
" domain the node belongs to, separated by ','")
|
||||
flag.BoolVar(&conf.EnableReadAffinity, "enable-read-affinity", false, "enable read affinity")
|
||||
flag.StringVar(
|
||||
&conf.CrushLocationLabels,
|
||||
"crush-location-labels",
|
||||
"",
|
||||
"list of Kubernetes node labels, that determines the"+
|
||||
" CRUSH location the node belongs to, separated by ','")
|
||||
|
||||
// cephfs related flags
|
||||
flag.BoolVar(
|
||||
|
Reference in New Issue
Block a user