Skip to content

Commit

Permalink
Update the Velero CSI version in csi.md (#7570)
Browse files Browse the repository at this point in the history
Describe how to support Velero with Kopia,
when ReadOnlyRootFilesystem is enabled.

Signed-off-by: Xun Jiang <[email protected]>
  • Loading branch information
blackpiglet authored Mar 27, 2024
1 parent cd0632c commit 7a9d7a8
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 7 deletions.
2 changes: 1 addition & 1 deletion site/content/docs/main/csi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Both of these can be added with the `velero install` command.
```bash
velero install \
--features=EnableCSI \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.3.0 \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.7.0 \
...
```

Expand Down
41 changes: 41 additions & 0 deletions site/content/docs/main/file-system-backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,47 @@ Velero does not provide a mechanism to detect persistent volume claims that are

To solve this, a controller was written by Thomann Bits&Beats: [velero-pvc-watcher][7]

## Support ReadOnlyRootFilesystem setting on Velero server pod
### Kopia
When the Velero server pod's SecurityContext sets the `ReadOnlyRootFileSystem` parameter to true, the Velero server pod's filesystem is running in read-only mode.
If the user creates a backup with Kopia as the uploader, or a backup enabling snapshot data mover function, the backup will fail, because the Kopia needs to write some cache and configuration data into the pod filesystem.

```
Errors: Velero: name: /mongodb-0 message: /Error backing up item error: /failed to wait BackupRepository: backup repository is not ready: error to connect to backup repo: error to connect repo with storage: error to connect to repository: unable to write config file: unable to create config directory: mkdir /home/cnb/udmrepo: read-only file system name: /mongodb-1 message: /Error backing up item error: /failed to wait BackupRepository: backup repository is not ready: error to connect to backup repo: error to connect repo with storage: error to connect to repository: unable to write config file: unable to create config directory: mkdir /home/cnb/udmrepo: read-only file system name: /mongodb-2 message: /Error backing up item error: /failed to wait BackupRepository: backup repository is not ready: error to connect to backup repo: error to connect repo with storage: error to connect to repository: unable to write config file: unable to create config directory: mkdir /home/cnb/udmrepo: read-only file system Cluster: <none>
```

The workaround is making those directories as ephemeral k8s volumes, then those directories are not counted as pod's root filesystem.
The `user-name` is the Velero pod's running user name. The default value is `cnb`.

``` yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: velero
namespace: velero
spec:
template:
spec:
containers:
- name: velero
......
volumeMounts:
......
- mountPath: /home/<user-name>/udmrepo
name: udmrepo
- mountPath: /home/<user-name>/.cache
name: cache
......
volumes:
......
- emptyDir: {}
name: udmrepo
- emptyDir: {}
name: cache
......
```


[1]: https://github.com/restic/restic
[2]: https://github.com/kopia/kopia
[3]: customize-installation.md#enable-restic-integration
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/v1.10/csi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Both of these can be added with the `velero install` command.
```bash
velero install \
--features=EnableCSI \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.3.0 \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.4.0 \
...
```

Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/v1.11/csi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Both of these can be added with the `velero install` command.
```bash
velero install \
--features=EnableCSI \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.3.0 \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.5.0 \
...
```

Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/v1.12/csi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Both of these can be added with the `velero install` command.
```bash
velero install \
--features=EnableCSI \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.3.0 \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.6.0 \
...
```

Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/v1.13/csi.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Both of these can be added with the `velero install` command.
```bash
velero install \
--features=EnableCSI \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.3.0 \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.7.0 \
...
```

Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/v1.7/csi.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Both of these can be added with the `velero install` command.
```bash
velero install \
--features=EnableCSI \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.1.0 \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.2.0 \
...
```

Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/v1.8/csi.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Both of these can be added with the `velero install` command.
```bash
velero install \
--features=EnableCSI \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.1.0 \
--plugins=<object storage plugin>,velero/velero-plugin-for-csi:v0.2.0 \
...
```

Expand Down

0 comments on commit 7a9d7a8

Please sign in to comment.