https://github.com/cloudbees-oss/inject-metadata-velero-plugin
https://github.com/cloudbees-oss/inject-metadata-velero-plugin
velero-plugin
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cloudbees-oss/inject-metadata-velero-plugin
- Owner: cloudbees-oss
- License: apache-2.0
- Created: 2022-04-12T05:47:58.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-25T15:04:06.000Z (over 1 year ago)
- Last Synced: 2024-10-26T08:02:25.772Z (over 1 year ago)
- Topics: velero-plugin
- Language: Go
- Homepage:
- Size: 287 KB
- Stars: 0
- Watchers: 5
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A [restore plugin for Velero](https://velero.io/docs/v1.8/custom-plugins/#plugin-kinds)
which mutates all restored `StatefulSet`s and `Deployment`s,
adding (or replacing) the environment variable `RESTORED_FROM_BACKUP` in each container.
The value will be the identifier of the Velero restore object.
This is useful for informing a stateful application that it has been freshly restored from backup.
It might then take special steps to recover from partly written files, etc.
CloudBees CI [honors this variable](https://docs.cloudbees.com/docs/admin-resources/latest/pipelines/controlling-builds#_restarting_builds_after_a_restore).
Usage:
```yaml
initContainers:
# your existing plugins, then add:
- name: inject-metadata-velero-plugin
image: ghcr.io/cloudbees-oss/inject-metadata-velero-plugin:main
imagePullPolicy: Always
volumeMounts:
- mountPath: /target
name: plugins
```
Binaries are [signed with Sigstore](https://docs.sigstore.dev/cosign/openid_signing).
[Kubernetes feature #48180](https://github.com/kubernetes/kubernetes/issues/48180), if implemented, would offer an alternate approach.