Skip to content

Commit

Permalink
docs(vi,vd): add storage class info
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Tishkov <pavel.tishkov@flant.com>
  • Loading branch information
fl64 committed Oct 23, 2024
1 parent 9d10307 commit 7f02a74
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
13 changes: 11 additions & 2 deletions docs/USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Images can be created from other images and virtual machine disks.
Project image two storage options are supported:

- `ContainerRegistry` - the default type in which the image is stored in `DVCR`.
- `Kubernetes` - the type that uses `PVC` as the storage for the image. This option is preferred if you are using storage that supports `PVC` fast cloning, which allows you to create disks from images faster.
- `PersistentVolumeClaim` - the type that uses `PVC` as the storage for the image. This option is preferred if you are using storage that supports `PVC` fast cloning, which allows you to create disks from images faster.

A full description of the `VirtualImage` resource configuration settings can be found at [link](cr.html#virtualimage).

Expand Down Expand Up @@ -236,7 +236,11 @@ kind: VirtualImage
metadata:
name: ubuntu-22.04-pvc
spec:
storage: Kubernetes
storage: PersistentVolumeClaim
persistentVolumeClaim:
# Substitute your StorageClass name.
storageClassName: i-linstor-thin-r2
# Source for image creation.
dataSource:
type: HTTP
http:
Expand All @@ -253,6 +257,9 @@ d8 k get vi ubuntu-22.04-pvc
# ubuntu-22.04-pvc Ready false 100% 23h
```

If the `.spec.persistentVolumeClaim.storageClassName` parameter is not specified, the default `StorageClass` at the cluster level will be used, or for images if specified in [module settings](./ADMIN_GUIDE.md#storage-class-settings-for-images).


### Creating an image from Container Registry

An image stored in Container Registry has a certain format. Let's look at an example:
Expand Down Expand Up @@ -453,6 +460,8 @@ After creation, the `VirtualDisk` resource can be in the following states (phase

As long as the disk has not entered the `Ready` phase, the contents of the entire `.spec` block can be changed. If changes are made, the disk creation process will start over.

If the `.spec.persistentVolumeClaim.storageClassName` parameter is not specified, the default `StorageClass` at the cluster level will be used, or for images if specified in [module settings](./ADMIN_GUIDE.md#storage-class-settings-for-disks).

Check the status of the disk after creation with the command:

```bash
Expand Down
12 changes: 10 additions & 2 deletions docs/USER_GUIDE_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ d8 k delete vi ubuntu
Проектный образ поддерживаются два варианта хранения:

- `ContainerRegistry` - тип по умолчанию, при котором образ хранится в `DVCR`.
- `Kubernetes` - тип, при котором в качестве хранилища для образа используется `PVC`. Этот вариант предпочтителен, если используется хранилище с поддержкой быстрого клонирования `PVC`, что позволяет быстрее создавать диски из образов.
- `PersistentVolumeClaim` - тип, при котором в качестве хранилища для образа используется `PVC`. Этот вариант предпочтителен, если используется хранилище с поддержкой быстрого клонирования `PVC`, что позволяет быстрее создавать диски из образов.

С полным описанием параметров конфигурации ресурса `VirtualImage` можно ознакомиться по [ссылке](cr.html#virtualimage).

Expand Down Expand Up @@ -241,7 +241,10 @@ metadata:
name: ubuntu-22.04-pvc
spec:
# Настройки хранения проектного образа.
storage: Kubernetes
storage: PersistentVolumeClaim
persistentVolumeClaim:
# Подставьте ваше название StorageClass.
storageClassName: i-linstor-thin-r2
# Источник для создания образа.
dataSource:
type: HTTP
Expand All @@ -259,6 +262,8 @@ d8 k get vi ubuntu-22.04-pvc
# ubuntu-22.04-pvc Ready false 100% 23h
```

Если параметр `.spec.persistentVolumeClaim.storageClassName` не указан, то будет использован `StorageClass` по умолчанию на уровне кластера, либо для образов, если он указан в [настройках модуля](./ADMIN_GUIDE_RU.md#настройки-классов-хранения-для-образов).

### Создание образа из Container Registry

Образ, хранящийся в Container Registry имеет определенный формат. Рассмотрим на примере:
Expand Down Expand Up @@ -424,6 +429,7 @@ kubectl get storageclass
# nfs-4-1-wffc nfs.csi.k8s.io Delete WaitForFirstConsumer true 30d
```


С полным описанием параметров конфигурации дисков можно ознакомиться по [ссылке](cr.html#virtualdisk).

### Создание пустого диска
Expand Down Expand Up @@ -459,6 +465,8 @@ EOF

До тех пор пока диск не перешёл в фазу `Ready` содержимое всего блока `.spec` допускается изменять. При изменении процесс создании диска запустится заново.

Если параметр `.spec.persistentVolumeClaim.storageClassName` не указан, то будет использован `StorageClass` по умолчанию на уровне кластера, либо для образов, если он указан в [настройках модуля](./ADMIN_GUIDE_RU.md#настройки-классов-хранения-для-дисков).

Проверьте состояние диска после создание командой:

```bash
Expand Down

0 comments on commit 7f02a74

Please sign in to comment.