Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration examples #102

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
30 changes: 30 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,33 @@ The controller will then stop tracking the selected `Volume Group` and delete th
This can happen if you created the `LVM Volume Group` using the `LVMVolumeGroup` resource, in which case the controller will automatically add this LVM tag to the created `LVM Volume Group`. This is also possible if the `Volume Group` or its `Thin-pool` already had the `linstor-*` LVM tag of the `linstor` module.

When you switch from the `linstor` module to the `sds-node-configurator` and `sds-drbd` modules, the `linstor-*` LVM tags are automatically replaced with the `storage.deckhouse.io/enabled=true` LVM tag in the `Volume Group`. This way, the `sds-node-configurator` gains control over these `Volume Groups`.

## How to use the `LVMVolumeGroupSet` resource to create `LVMVolumeGroup`?

To create an `LVMVolumeGroup` using the `LVMVolumeGroupSet` resource, you need to specify node selectors and a template for the `LVMVolumeGroup` resources in the `LVMVolumeGroupSet` specification. Currently, only the `PerNode` strategy is supported. With this strategy, the controller will create one `LVMVolumeGroup` resource from the template for each node that matches the selector.

Example of an `LVMVolumeGroupSet` specification:

```yaml
apiVersion: storage.deckhouse.io/v1alpha1
kind: LVMVolumeGroupSet
metadata:
name: my-lvm-volume-group-set
labels:
my-label: my-value
spec:
strategy: PerNode
nodeSelector:
matchLabels:
node-role.kubernetes.io/worker: ""
lvmVolumeGroupTemplate:
metadata:
labels:
my-label-for-lvg: my-value-for-lvg
spec:
type: Local
blockDeviceSelector:
matchLabels:
status.blockdevice.storage.deckhouse.io/model: <model>
actualVGNameOnTheNode: <actual-vg-name-on-the-node>
```
32 changes: 32 additions & 0 deletions docs/FAQ_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,35 @@ vgchange myvg-0 --deltag storage.deckhouse.io/enabled=true
Это возможно в случае, если вы создавали `LVM Volume Group` через ресурс `LVMVolumeGroup` (в таком случае контроллер автоматически вешает данный LVM-тег на созданную `LVM Volume Group`). Либо на данной `Volume Group` или ее `Thin-pool` был LVM-тег модуля `linstor` — `linstor-*`.

При миграции с встроенного модуля `linstor` на модули `sds-node-configurator` и `sds-drbd` автоматически происходит изменение LVM-тегов `linstor-*` на LVM-тег `storage.deckhouse.io/enabled=true` в `Volume Group`. Таким образом, управление этими `Volume Group` передается модулю `sds-node-configurator`.

## Как использовать ресурс `LVMVolumeGroupSet` для создания `LVMVolumeGroup`?

Для создания `LVMVolumeGroup` с помощью `LVMVolumeGroupSet` необходимо указать в спецификации `LVMVolumeGroupSet` селекторы для нод и шаблон для создаваемых ресурсов `LVMVolumeGroup`. На данный момент поддерживается только стратегия `PerNode`, при которой контроллер создаст по одному ресуру `LVMVolumeGroup` из шаблона для каждой ноды, удовлетворяющей селектору.

Пример спецификации `LVMVolumeGroupSet`:

```yaml
apiVersion: storage.deckhouse.io/v1alpha1
kind: LVMVolumeGroupSet
metadata:
name: my-lvm-volume-group-set
labels:
my-label: my-value
spec:
strategy: PerNode
nodeSelector:
matchLabels:
node-role.kubernetes.io/worker: ""
lvmVolumeGroupTemplate:
metadata:
labels:
my-label-for-lvg: my-value-for-lvg
spec:
type: Local
blockDeviceSelector:
matchLabels:
status.blockdevice.storage.deckhouse.io/model: <model>
actualVGNameOnTheNode: <actual-vg-name-on-the-node>


```
Loading
Loading