This is the documentation for the latest development version of Velero. Both code and docs may be unstable, and these docs are not guaranteed to be up to date or correct. See the latest version.
Velero has a plugin architecture that allows users to add their own custom functionality to Velero backups & restores without having to modify/recompile the core Velero binary. To add custom functionality, users simply create their own binary containing implementations of Velero’s plugin kinds (described below), plus a small amount of boilerplate code to expose the plugin implementations to Velero. This binary is added to a container image that serves as an init container for the Velero server pod and copies the binary into a shared emptyDir volume for the Velero server to access.
Multiple plugins, of any type, can be implemented in this binary.
A fully-functional sample plugin repository is provided to serve as a convenient starting point for plugin authors.
When naming your plugin, keep in mind that the name needs to conform to these rules:
- example.io/azure - 184.108.40.206/5678 - example-with-dash.io/azure
You will need to give your plugin(s) a name when registering them by calling the appropriate
RegisterX function: https://github.com/heptio/velero/blob/0e0f357cef7cf15d4c1d291d3caafff2eeb69c1e/pkg/plugin/framework/server.go#L42-L60
Velero currently supports the following kinds of plugins:
Velero provides a logger that can be used by plugins to log structured information to the main Velero server log or
per-backup/restore logs. It also passes a
--log-level flag to each plugin binary, whose value is the value of the same
flag from the main Velero process. This means that if you turn on debug logging for the Velero server via
plugins will also emit debug-level logs. See the sample repository for an example of how to use the logger within your plugin.