Skip to content

Commit

Permalink
[docs] Changes in FAQ about snapshot creation (#24)
Browse files Browse the repository at this point in the history
Signed-off-by: v.oleynikov <[email protected]>
  • Loading branch information
duckhawk authored Jul 23, 2024
1 parent 264399e commit 9458b0a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 49 deletions.
26 changes: 2 additions & 24 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,7 @@ EOF

```

### Step 2: Creating the VolumeSnapshotClass

Create a VolumeSnapshotClass with the necessary parameters:

```shell
kubectl apply -f -<<EOF
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: csi-nfs-snapshot-class
driver: nfs.csi.k8s.io
deletionPolicy: <Delete or Retain>
EOF

```

The deletionPolicy parameter can be set to Delete or Retain depending on your use case:

- Delete — the snapshot will be deleted along with the VolumeSnapshot.

- Retain — the snapshot will be retained after the VolumeSnapshot is deleted.

### Step 3: Creating a Volume Snapshot
### Step 2: Creating a Volume Snapshot

Now you can create volume snapshots. To do this, execute the following command with the necessary parameters:

Expand All @@ -78,7 +56,7 @@ EOF
```


### Step 4: Checking the Snapshot Status
### Step 3: Checking the Snapshot Status

To check the status of the created snapshot, execute the command:

Expand Down
27 changes: 2 additions & 25 deletions docs/FAQ_RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,7 @@ EOF

```

### Шаг 2: Создание VolumeSnapshotClass

Создайте VolumeSnapshotClass с необходимыми параметрами:

```shell
kubectl apply -f -<<EOF
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: csi-nfs-snapshot-class
driver: nfs.csi.k8s.io
deletionPolicy: <Delete или Retain>
EOF

```

Параметр deletionPolicy может быть установлен на Delete или Retain в зависимости от вашего сценария использования:

- Delete — снимок будет удален вместе с удалением VolumeSnapshot.

- Retain — снимок будет сохраняться после удаления VolumeSnapshot.


### Шаг 3: Создание снимка тома
### Шаг 2: Создание снимка тома

Теперь вы можете создавать снимки томов. Для этого выполните следующую команду, указав нужные параметры:

Expand All @@ -78,7 +55,7 @@ EOF

```

### Шаг 4: Проверка состояния снимка
### Шаг 3: Проверка состояния снимка

Чтобы проверить состояние созданного снимка, выполните команду:

Expand Down
10 changes: 10 additions & 0 deletions templates/csi/volume-snapshot-class.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if (.Values.global.enabledModules | has "snapshot-controller") }}
---
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
name: csi-nfs-snapshot-class
{{- include "helm_lib_module_labels" (list . (dict "app" "csi-nfs")) | nindent 2 }}
driver: nfs.csi.k8s.io
deletionPolicy: Delete
{{- end }}

0 comments on commit 9458b0a

Please sign in to comment.