Files
velero/site/docs/v0.7.1/plugins.md
Lee Springer d995018a3e add velero.io site content, move docs to under site/docs (#1489)
* Adding in Jekyll site | Adjusting gitignore for Jekyll build | Moving docs to site folder

Signed-off-by: Lee Springer <lee@smalltalk.agency>

Adding in Jekyll site | Adjusting gitignore for Jekyll build | Moving docs to site folder

Signed-off-by: Lee Springer <lee@smalltalk.agency>

* Restore main.go to original location

Signed-off-by: Lee Springer <lee@smalltalk.agency>

* Updates to footer

Signed-off-by: Lee Springer <lee@smalltalk.agency>

* Updates to homepage links

Signed-off-by: Lee Springer <lee@smalltalk.agency>

* Content updates

Signed-off-by: Lee Springer <lee@smalltalk.agency>
2019-05-17 10:56:03 -07:00

1.8 KiB

Plugins

Heptio Ark has a plugin architecture that allows users to add their own custom functionality to Ark backups & restores without having to modify/recompile the core Ark binary. To add custom functionality, users simply create their own binary containing an implementation of one of Ark's plugin kinds (described below), plus a small amount of boilerplate code to expose the plugin implementation to Ark. This binary is added to a container image that serves as an init container for the Ark server pod and copies the binary into a shared emptyDir volume for the Ark server to access.

A fully-functional sample plugin repository is provided to serve as a convenient starting point for plugin authors.

Plugin Kinds

Ark currently supports the following kinds of plugins:

  • Object Store - persists and retrieves backups, backup logs and restore logs
  • Block Store - creates volume snapshots (during backup) and restores volumes from snapshots (during restore)
  • Backup Item Action - executes arbitrary logic for individual items prior to storing them in a backup file
  • Restore Item Action - executes arbitrary logic for individual items prior to restoring them into a cluster

Plugin Naming

Ark relies on a naming convention to identify plugins. Each plugin binary should be named ark-<plugin-kind>-<name>, where plugin-kind is one of objectstore, blockstore, backupitemaction, or restoreitemaction, and name is unique within the plugin kind.

Plugin Logging

Ark provides a logger that can be used by plugins to log structured information to the main Ark server log or per-backup/restore logs. See the sample repository for an example of how to instantiate and use the logger within your plugin.