Skip to content

Commit

Permalink
chore: add velero csi plugin (#424)
Browse files Browse the repository at this point in the history
## Description
Adding the CSI plugin to Velero
...

## Related Issue

Fixes #
<!-- or -->
Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)(https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md#submitting-a-pull-request)
followed

---------

Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
  • Loading branch information
justicorn and mjnagel committed May 28, 2024
1 parent c3ecc8b commit c7e49e9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/velero/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,20 @@ uds zarf tools kubectl apply -f - <<-EOF
ttl: 240h0m0s
EOF
```

## Manually restore backup
```bash
velero restore create uds-restore-$(date +%s) \
--from-backup <backup-name> \
--include-namespaces <namespaces-to-restore> --wait
```

> [!NOTE]
> The default behavior of Velero will not recreate resources that already exist.
> If the intention is to restore data on a PV, the PV/PVC will have to be deleted
> before running the restore.
> [!NOTE]
> Additional configuration will be required to get CSI backed PVCs to be snapshotted
> as noted in the [Velero documentation](https://velero.io/docs/main/csi/#prerequisites) - VolumeSnapshotLocation, VolumeSnapshotClass, etc.
> as well as switching `snapshotVolume` to `true` in the backup config.
6 changes: 6 additions & 0 deletions src/velero/values/registry1-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ initContainers:
volumeMounts:
- mountPath: /target
name: plugins
- name: velero-plugin-for-csi
image: registry1.dso.mil/ironbank/opensource/velero/velero-plugin-for-csi:v0.7.0
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /target
name: plugins
6 changes: 6 additions & 0 deletions src/velero/values/upstream-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ initContainers:
volumeMounts:
- mountPath: /target
name: plugins
- name: velero-plugin-for-csi
image: velero/velero-plugin-for-csi:v0.7.0
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /target
name: plugins
2 changes: 2 additions & 0 deletions src/velero/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ components:
- velero/velero:v1.13.2
- velero/velero-plugin-for-aws:v1.9.2
- docker.io/bitnami/kubectl:1.30.1
- velero/velero-plugin-for-csi:v0.7.0

- name: velero
required: true
Expand All @@ -33,4 +34,5 @@ components:
images:
- registry1.dso.mil/ironbank/opensource/velero/velero:v1.13.2
- registry1.dso.mil/ironbank/opensource/velero/velero-plugin-for-aws:v1.9.2
- registry1.dso.mil/ironbank/opensource/velero/velero-plugin-for-csi:v0.7.0
- registry1.dso.mil/ironbank/big-bang/base:2.1.0

0 comments on commit c7e49e9

Please sign in to comment.