Skip to content

Commit 0686816

Browse files
authored
docs: Added a cmd for topology labels in Mayastor Configuration document (#489)
* docs: Added a cmd for topology labels in Mayastor Configuration document Signed-off-by: Bala Harish <[email protected]> * docs: Added a cmd for topology labels in Mayastor Configuration document Signed-off-by: Bala Harish <[email protected]> --------- Signed-off-by: Bala Harish <[email protected]>
1 parent c36f5bb commit 0686816

File tree

2 files changed

+32
-2
lines changed
  • docs
    • main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor
    • versioned_docs/version-4.1.x/user-guides/replicated-storage-user-guide/replicated-pv-mayastor

2 files changed

+32
-2
lines changed

docs/main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ spec:
6868
EOF
6969
```
7070

71-
The diskpool is created with labels to satisfy `poolHasTopologyKey` and `poolAffinityTopologyLabel` parameters of the storage class. This helps place the replicas of volume based on the pool labels.
71+
Inorder to place the volume replicas based on the pool labels i.e. to satisfy `poolHasTopologyKey` and `poolAffinityTopologyLabel` parameters of the storage class, the pools must be labelled with the topology field.
72+
This can be achieved in two ways:
73+
74+
1. Create a new pool with the labels.
7275

7376
**Example DiskPool Definition with Labels**
7477
```
@@ -87,6 +90,12 @@ spec:
8790
EOF
8891
```
8992

93+
2. The existing pools can be labelled using the plugin. This will not affect any of the pre-existing volumes.
94+
95+
```
96+
kubectl mayastor label pool pool-on-node-1 topology-key=topology-value -n openebs
97+
```
98+
9099
**YAML**
91100
```text
92101
apiVersion: "openebs.io/v1beta2"
@@ -244,6 +253,7 @@ parameters:
244253
zone: us-west-1
245254
provisioner: io.openebs.csi-mayastor
246255
volumeBindingMode: Immediate
256+
EOF
247257
```
248258

249259
Apply the labels to the nodes using the below command:
@@ -283,6 +293,7 @@ parameters:
283293
rack
284294
provisioner: io.openebs.csi-mayastor
285295
volumeBindingMode: Immediate
296+
EOF
286297
```
287298

288299
Apply the labels on the node using the below command:
@@ -325,6 +336,7 @@ parameters:
325336
zone
326337
provisioner: io.openebs.csi-mayastor
327338
volumeBindingMode: Immediate
339+
EOF
328340
```
329341

330342
Apply the labels to the nodes using the below command:
@@ -369,6 +381,7 @@ parameters:
369381
zone: us-west-1
370382
provisioner: io.openebs.csi-mayastor
371383
volumeBindingMode: Immediate
384+
EOF
372385
```
373386

374387
Apply the labels to the pools using the below command:
@@ -411,6 +424,7 @@ spec:
411424
topology:
412425
labelled:
413426
zone: us-west-1
427+
EOF
414428
```
415429

416430
**Command (Get filtered pools based on labels)**
@@ -448,6 +462,7 @@ parameters:
448462
zone
449463
provisioner: io.openebs.csi-mayastor
450464
volumeBindingMode: Immediate
465+
EOF
451466
```
452467

453468
**Command (Get filtered pools based on labels)**

docs/versioned_docs/version-4.1.x/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ spec:
6868
EOF
6969
```
7070

71-
The diskpool is created with labels to satisfy `poolHasTopologyKey` and `poolAffinityTopologyLabel` parameters of the storage class. This helps place the replicas of volume based on the pool labels.
71+
Inorder to place the volume replicas based on the pool labels i.e. to satisfy `poolHasTopologyKey` and `poolAffinityTopologyLabel` parameters of the storage class, the pools must be labelled with the topology field.
72+
This can be achieved in two ways:
73+
74+
1. Create a new pool with the labels.
7275

7376
**Example DiskPool Definition with Labels**
7477
```
@@ -87,6 +90,12 @@ spec:
8790
EOF
8891
```
8992

93+
2. The existing pools can be labelled using the plugin. This will not affect any of the pre-existing volumes.
94+
95+
```
96+
kubectl mayastor label pool pool-on-node-1 topology-key=topology-value -n openebs
97+
```
98+
9099
**YAML**
91100
```text
92101
apiVersion: "openebs.io/v1beta2"
@@ -244,6 +253,7 @@ parameters:
244253
zone: us-west-1
245254
provisioner: io.openebs.csi-mayastor
246255
volumeBindingMode: Immediate
256+
EOF
247257
```
248258

249259
Apply the labels to the nodes using the below command:
@@ -283,6 +293,7 @@ parameters:
283293
rack
284294
provisioner: io.openebs.csi-mayastor
285295
volumeBindingMode: Immediate
296+
EOF
286297
```
287298

288299
Apply the labels on the node using the below command:
@@ -325,6 +336,7 @@ parameters:
325336
zone
326337
provisioner: io.openebs.csi-mayastor
327338
volumeBindingMode: Immediate
339+
EOF
328340
```
329341

330342
Apply the labels to the nodes using the below command:
@@ -369,6 +381,7 @@ parameters:
369381
zone: us-west-1
370382
provisioner: io.openebs.csi-mayastor
371383
volumeBindingMode: Immediate
384+
EOF
372385
```
373386

374387
Apply the labels to the pools using the below command:
@@ -411,6 +424,7 @@ spec:
411424
topology:
412425
labelled:
413426
zone: us-west-1
427+
EOF
414428
```
415429

416430
**Command (Get filtered pools based on labels)**
@@ -448,6 +462,7 @@ parameters:
448462
zone
449463
provisioner: io.openebs.csi-mayastor
450464
volumeBindingMode: Immediate
465+
EOF
451466
```
452467

453468
**Command (Get filtered pools based on labels)**

0 commit comments

Comments
 (0)