From c7e49e91d9f7810ddc0368f146d43d3c94c782ad Mon Sep 17 00:00:00 2001 From: justicorn <167213144+justicorn@users.noreply.github.com> Date: Tue, 28 May 2024 16:28:14 -0400 Subject: [PATCH] chore: add velero csi plugin (#424) ## Description Adding the CSI plugin to Velero ... ## Related Issue Fixes # 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 --- src/velero/README.md | 17 +++++++++++++++++ src/velero/values/registry1-values.yaml | 6 ++++++ src/velero/values/upstream-values.yaml | 6 ++++++ src/velero/zarf.yaml | 2 ++ 4 files changed, 31 insertions(+) diff --git a/src/velero/README.md b/src/velero/README.md index 81d0fc4d2..a24c25567 100644 --- a/src/velero/README.md +++ b/src/velero/README.md @@ -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 \ + --include-namespaces --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. \ No newline at end of file diff --git a/src/velero/values/registry1-values.yaml b/src/velero/values/registry1-values.yaml index 9dfd6d4b0..7996ed097 100644 --- a/src/velero/values/registry1-values.yaml +++ b/src/velero/values/registry1-values.yaml @@ -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 diff --git a/src/velero/values/upstream-values.yaml b/src/velero/values/upstream-values.yaml index f0dfe5bfa..ba5b06c59 100644 --- a/src/velero/values/upstream-values.yaml +++ b/src/velero/values/upstream-values.yaml @@ -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 diff --git a/src/velero/zarf.yaml b/src/velero/zarf.yaml index 211f6a7b4..7fc2369d0 100644 --- a/src/velero/zarf.yaml +++ b/src/velero/zarf.yaml @@ -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 @@ -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