From 3b832e821129111a5f19af2e07e1abbe862a30e6 Mon Sep 17 00:00:00 2001 From: Bala Harish <161304963+balaharish7@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:08:10 +0530 Subject: [PATCH 1/2] docs: Added a cmd for topology labels in Mayastor Configuration document Signed-off-by: Bala Harish <161304963+balaharish7@users.noreply.github.com> --- .../replicated-pv-mayastor/rs-configuration.md | 11 +++++++++++ .../replicated-pv-mayastor/rs-configuration.md | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/docs/main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md b/docs/main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md index ed12375d..cbc1b791 100644 --- a/docs/main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md +++ b/docs/main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md @@ -69,6 +69,11 @@ EOF ``` 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. +You can use the plugin to add labels to pools that do not have topology labels: + +``` +kubectl mayastor label pool pool-on-node-1 topology-key=topology-value -n openebs +``` **Example DiskPool Definition with Labels** ``` @@ -244,6 +249,7 @@ parameters: zone: us-west-1 provisioner: io.openebs.csi-mayastor volumeBindingMode: Immediate +EOF ``` Apply the labels to the nodes using the below command: @@ -283,6 +289,7 @@ parameters: rack provisioner: io.openebs.csi-mayastor volumeBindingMode: Immediate +EOF ``` Apply the labels on the node using the below command: @@ -325,6 +332,7 @@ parameters: zone provisioner: io.openebs.csi-mayastor volumeBindingMode: Immediate +EOF ``` Apply the labels to the nodes using the below command: @@ -369,6 +377,7 @@ parameters: zone: us-west-1 provisioner: io.openebs.csi-mayastor volumeBindingMode: Immediate +EOF ``` Apply the labels to the pools using the below command: @@ -411,6 +420,7 @@ spec: topology: labelled: zone: us-west-1 +EOF ``` **Command (Get filtered pools based on labels)** @@ -448,6 +458,7 @@ parameters: zone provisioner: io.openebs.csi-mayastor volumeBindingMode: Immediate +EOF ``` **Command (Get filtered pools based on labels)** diff --git a/docs/versioned_docs/version-4.1.x/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md b/docs/versioned_docs/version-4.1.x/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md index edcd9b6e..2188df39 100644 --- a/docs/versioned_docs/version-4.1.x/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md +++ b/docs/versioned_docs/version-4.1.x/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md @@ -69,6 +69,11 @@ EOF ``` 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. +You can use the plugin to add labels to pools that do not have topology labels: + +``` +kubectl mayastor label pool pool-on-node-1 topology-key=topology-value -n openebs +``` **Example DiskPool Definition with Labels** ``` @@ -244,6 +249,7 @@ parameters: zone: us-west-1 provisioner: io.openebs.csi-mayastor volumeBindingMode: Immediate +EOF ``` Apply the labels to the nodes using the below command: @@ -283,6 +289,7 @@ parameters: rack provisioner: io.openebs.csi-mayastor volumeBindingMode: Immediate +EOF ``` Apply the labels on the node using the below command: @@ -325,6 +332,7 @@ parameters: zone provisioner: io.openebs.csi-mayastor volumeBindingMode: Immediate +EOF ``` Apply the labels to the nodes using the below command: @@ -369,6 +377,7 @@ parameters: zone: us-west-1 provisioner: io.openebs.csi-mayastor volumeBindingMode: Immediate +EOF ``` Apply the labels to the pools using the below command: @@ -411,6 +420,7 @@ spec: topology: labelled: zone: us-west-1 + EOF ``` **Command (Get filtered pools based on labels)** @@ -448,6 +458,7 @@ parameters: zone provisioner: io.openebs.csi-mayastor volumeBindingMode: Immediate +EOF ``` **Command (Get filtered pools based on labels)** From f3abb4383de7d19ebf025229d3c544a5b18063c9 Mon Sep 17 00:00:00 2001 From: Bala Harish <161304963+balaharish7@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:18:15 +0530 Subject: [PATCH 2/2] docs: Added a cmd for topology labels in Mayastor Configuration document Signed-off-by: Bala Harish <161304963+balaharish7@users.noreply.github.com> --- .../replicated-pv-mayastor/rs-configuration.md | 14 +++++++++----- .../replicated-pv-mayastor/rs-configuration.md | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/docs/main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md b/docs/main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md index cbc1b791..ef7773d7 100644 --- a/docs/main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md +++ b/docs/main/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md @@ -68,12 +68,10 @@ spec: EOF ``` -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. -You can use the plugin to add labels to pools that do not have topology labels: +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. +This can be achieved in two ways: -``` -kubectl mayastor label pool pool-on-node-1 topology-key=topology-value -n openebs -``` +1. Create a new pool with the labels. **Example DiskPool Definition with Labels** ``` @@ -92,6 +90,12 @@ spec: EOF ``` +2. The existing pools can be labelled using the plugin. This will not affect any of the pre-existing volumes. + +``` +kubectl mayastor label pool pool-on-node-1 topology-key=topology-value -n openebs +``` + **YAML** ```text apiVersion: "openebs.io/v1beta2" diff --git a/docs/versioned_docs/version-4.1.x/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md b/docs/versioned_docs/version-4.1.x/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md index 2188df39..ad50151b 100644 --- a/docs/versioned_docs/version-4.1.x/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md +++ b/docs/versioned_docs/version-4.1.x/user-guides/replicated-storage-user-guide/replicated-pv-mayastor/rs-configuration.md @@ -68,12 +68,10 @@ spec: EOF ``` -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. -You can use the plugin to add labels to pools that do not have topology labels: +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. +This can be achieved in two ways: -``` -kubectl mayastor label pool pool-on-node-1 topology-key=topology-value -n openebs -``` +1. Create a new pool with the labels. **Example DiskPool Definition with Labels** ``` @@ -92,6 +90,12 @@ spec: EOF ``` +2. The existing pools can be labelled using the plugin. This will not affect any of the pre-existing volumes. + +``` +kubectl mayastor label pool pool-on-node-1 topology-key=topology-value -n openebs +``` + **YAML** ```text apiVersion: "openebs.io/v1beta2"