Skip to content

Commit ec82c8b

Browse files
fl64prismagod
andauthored
docs: update docs due 1.7 (#2093)
Update due 1.7.0. --------- Signed-off-by: Pavel Tishkov <pavel.tishkov@flant.com> Signed-off-by: Vladislav Panfilov <vladislav.panfilov@flant.com> Co-authored-by: Vladislav Panfilov <vladislav.panfilov@flant.com>
1 parent c4f67d9 commit ec82c8b

14 files changed

Lines changed: 1131 additions & 977 deletions

api/core/v1alpha2/cluster_virtual_image.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const (
3232
//
3333
// With this resource in the cluster, a container image is created and stored in a dedicated Deckhouse Virtualization Container Registry (DVCR).
3434
//
35+
// **Note:** The `metadata.name` field must comply with [Kubernetes object naming conventions](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/) and must not exceed 48 characters.
3536
// +kubebuilder:object:root=true
3637
// +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization,backup.deckhouse.io/cluster-config=true}
3738
// +kubebuilder:resource:categories={virtualization-cluster},scope=Cluster,shortName={cvi},singular=clustervirtualimage

api/core/v1alpha2/virtual_disk.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ const (
2929

3030
// The VirtualDisk resource describes the desired virtual machine disk configuration. A VirtualDisk can be mounted statically in the virtual machine by specifying it in the `.spec.blockDeviceRefs` disk list, or mounted on-the-fly using the VirtualMachineBlockDeviceAttachments resource.
3131
//
32-
// Once a VirtualDisk is created, only the disk size field `.spec.persistentVolumeClaim.size` can be changed. All other fields are immutable.
32+
// Once a VirtualDisk is created, the following fields in `.spec.persistentVolumeClaim` can be changed: `size` and `storageClassName`. All other fields are immutable.
33+
//
34+
// **Note:** The `metadata.name` field must comply with [Kubernetes object naming conventions](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/) and must not exceed 60 characters.
3335
// +kubebuilder:object:root=true
3436
// +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization}
3537
// +kubebuilder:resource:categories={virtualization},scope=Namespaced,shortName={vd},singular=virtualdisk

api/core/v1alpha2/virtual_image.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ const (
3131
// > This resource cannot be modified once it has been created.
3232
//
3333
// With this resource in the cluster, a container image is created and stored in a dedicated Deckhouse Virtualization Container Registry (DVCR) or PVC, with the data filled in from the source.
34+
//
35+
// **Note:** The `metadata.name` field must comply with [Kubernetes object naming conventions](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/) and must not exceed 49 characters.
3436
// +genclient
3537
// +kubebuilder:object:root=true
3638
// +kubebuilder:metadata:labels={heritage=deckhouse,module=virtualization}

crds/doc-ru-virtualdisks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ spec:
66
description: |
77
Ресурс VirtualDisk описывает желаемую конфигурацию диска виртуальной машины. VirtualDisk можно смонтировать в виртуальной машине статически, указав его в списке дисков `.spec.blockDeviceRefs`, или «на лету» – с помощью ресурса VirtualMachineBlockDeviceAttachments.
88
9-
После создания VirtualDisk можно изменить только размер диска с помощью поля `.spec.persistentVolumeClaim.size`. Все остальные поля изменить нельзя.
9+
После создания VirtualDisk в `.spec.persistentVolumeClaim` можно изменить поля `size` и `storageClassName`. Все остальные поля неизменяемы.
1010
1111
**Важно:** Поле `metadata.name` должно соответствовать [правилам именования объектов Kubernetes](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/) и не должно превышать 60 символов.
1212
properties:

crds/virtualdisks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ spec:
5757
description: |-
5858
The VirtualDisk resource describes the desired virtual machine disk configuration. A VirtualDisk can be mounted statically in the virtual machine by specifying it in the `.spec.blockDeviceRefs` disk list, or mounted on-the-fly using the VirtualMachineBlockDeviceAttachments resource.
5959
60-
Once a VirtualDisk is created, only the disk size field `.spec.persistentVolumeClaim.size` can be changed. All other fields are immutable.
60+
Once a VirtualDisk is created, the following fields in `.spec.persistentVolumeClaim` can be changed: `size` and `storageClassName`. All other fields are immutable.
6161
6262
**Note:** The `metadata.name` field must comply with [Kubernetes object naming conventions](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/) and must not exceed 60 characters.
6363
properties:

crds/virtualmachineipaddresses.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ spec:
121121
122122
* `Pending`: The resource is being created.
123123
* `Bound`: The VirtualMachineIPAddress has been bound to the VirtualMachineIPAddressLease resource.
124-
* `Attached`: The VirtualMachineIPAddress resource has been bound to the VirtualMachine resource.
124+
* `Attached`: The VirtualMachineIPAddress is attached to the VirtualMachine resource.
125125
observedGeneration:
126126
type: integer
127127
description: |

docs/ADMIN_GUIDE.md

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -194,26 +194,65 @@ Where:
194194
Not available in CE edition.
195195
{{< /alert >}}
196196

197-
{{< alert level="warning" >}}
198-
To set up auditing, the following modules must be enabled:
197+
To enable security event auditing:
199198

200-
- `log-shipper`,
201-
- `runtime-audit-engine`.
202-
{{< /alert >}}
199+
1. Enable `log-shipper` and `runtime-audit-engine` modules.
200+
1. Enable Kubernetes API audit by setting `.spec.settings.apiserver.auditPolicyEnabled: true` in the `control-plane-manager` module.
201+
1. Set `.spec.settings.audit.enabled: true` in the `virtualization` module:
203202

204-
To enable security event auditing, set the module’s `.spec.settings.audit.enabled` parameter to `true`:
203+
```yaml
204+
spec:
205+
settings:
206+
audit:
207+
enabled: true
208+
```
209+
210+
For a complete list of configuration options, see [Configuration](./configuration.html).
211+
212+
Events are collected by the `virtualization-audit-*` pod in the `d8-virtualization` namespace. To forward events to the cluster logging system (e.g., Loki), create a ClusterLoggingConfig:
205213

206214
```yaml
215+
apiVersion: deckhouse.io/v1alpha1
216+
kind: ClusterLoggingConfig
217+
metadata:
218+
name: virtualization-audit-logs
207219
spec:
208-
enabled: true
209-
settings:
210-
audit:
211-
enabled: true
220+
destinationRefs:
221+
- d8-loki
222+
kubernetesPods:
223+
namespaceSelector:
224+
matchNames:
225+
- d8-virtualization
226+
labelSelector:
227+
matchLabels:
228+
app: virtualization-audit
229+
type: KubernetesPods
212230
```
213231

214-
{{< alert level="info" >}}
215-
For a complete list of configuration options, see [Configuration](./configuration.html).
216-
{{< /alert >}}
232+
To view events in Grafana, use a Loki query:
233+
234+
```logql
235+
{namespace="d8-virtualization", pod=~"virtualization-audit-.*"}
236+
```
237+
238+
Available fields in the logs:
239+
- `type`: Event type (Access to VM, VM Management, etc.).
240+
- `name`: Human-readable description.
241+
- `request_subject`: Username or ServiceAccount.
242+
- `datetime`: Event timestamp.
243+
- `virtualmachine_name`: Affected VM.
244+
- `source_ip`: Request source IP (for forbidden operations).
245+
246+
### Security events
247+
248+
The audit system logs the following events:
249+
250+
- Access to VM: Connection via console, VNC, or port forward. Includes VM name, OS, versions, storage, and node address.
251+
- VM Management: Create, update, patch, or delete operations on [VirtualMachine](/modules/virtualization/cr.html#virtualmachine) resources.
252+
- VM Control Operations: Start, stop, restart, migrate, or evict via [VirtualMachineOperation](/modules/virtualization/cr.html#virtualmachineoperation) resource.
253+
- Integrity Check: SHA256 verification of VM configuration. Logs when checksum changes.
254+
- Module Control: Create, update, or delete operations on ModuleConfig.
255+
- Forbidden Operations: Operations blocked by the platform. Includes user, operation, resource, source IP, and denial reason.
217256

218257
## Images
219258

docs/ADMIN_GUIDE.ru.md

Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -194,26 +194,65 @@ spec:
194194
Недоступно в CE-редакции.
195195
{{< /alert >}}
196196

197-
{{< alert level="warning" >}}
198-
Для активации аудита требуется, чтобы были включены следующие модули:
197+
Для активации аудита событий безопасности:
199198

200-
- `log-shipper`,
201-
- `runtime-audit-engine`.
202-
{{< /alert >}}
199+
1. Включить модули `log-shipper` и `runtime-audit-engine`.
200+
1. Включить аудит Kubernetes API, установив `.spec.settings.apiserver.auditPolicyEnabled: true` в модуле `control-plane-manager`.
201+
1. Установить `.spec.settings.audit.enabled: true` в модуле `virtualization`:
202+
203+
```yaml
204+
spec:
205+
settings:
206+
audit:
207+
enabled: true
208+
```
209+
210+
Полный перечень параметров конфигурации приведён в разделе [Настройки](./configuration.html).
203211

204-
Чтобы включить аудит событий безопасности, установите параметр `.spec.settings.audit.enabled` настроек модуля в `true`:
212+
События собираются подом `virtualization-audit-*` в пространстве имён `d8-virtualization`. Чтобы перенаправить события в систему логирования кластера (например, Loki), создайте ClusterLoggingConfig:
205213

206214
```yaml
215+
apiVersion: deckhouse.io/v1alpha1
216+
kind: ClusterLoggingConfig
217+
metadata:
218+
name: virtualization-audit-logs
207219
spec:
208-
enabled: true
209-
settings:
210-
audit:
211-
enabled: true
220+
destinationRefs:
221+
- d8-loki
222+
kubernetesPods:
223+
namespaceSelector:
224+
matchNames:
225+
- d8-virtualization
226+
labelSelector:
227+
matchLabels:
228+
app: virtualization-audit
229+
type: KubernetesPods
212230
```
213231

214-
{{< alert level="info" >}}
215-
Полный перечень параметров конфигурации приведен в разделе [Настройки](./configuration.html).
216-
{{< /alert >}}
232+
Для просмотра событий в Grafana используйте запрос к Loki:
233+
234+
```logql
235+
{namespace="d8-virtualization", pod=~"virtualization-audit-.*"}
236+
```
237+
238+
Доступные поля в логах:
239+
- `type` — тип события (Access to VM, VM Management и т.д.);
240+
- `name` — описание события;
241+
- `request_subject` — username или ServiceAccount;
242+
- `datetime` — время события;
243+
- `virtualmachine_name` — имя ВМ;
244+
- `source_ip` — IP-адрес источника (для запрещённых операций).
245+
246+
### События безопасности
247+
248+
Система аудита фиксирует следующие события:
249+
250+
- Доступ к ВМ — подключение через console, VNC или port forward. Включает имя ВМ, ОС, версии, хранилище и адрес узла.
251+
- Управление ВМ — создание, обновление, изменение или удаление ресурсов [VirtualMachine](/modules/virtualization/cr.html#virtualmachine).
252+
- Управление ВМ через операции — Start, Stop, Restart, Migrate или Evict через ресурс [VirtualMachineOperation](/modules/virtualization/cr.html#virtualmachineoperation).
253+
- Проверка целостности — проверка SHA256 конфигурации ВМ. Логируется при изменении контрольной суммы.
254+
- Управление модулем — создание, обновление или удаление ModuleConfig.
255+
- Запрещённые операции — операции, заблокированные платформой. Включает пользователя, операцию, ресурс, IP-адрес и причину отказа.
217256

218257
## Образы
219258

0 commit comments

Comments
 (0)