Velero 1.5: Auto volume backup with restic, DeleteItemAction plugins, Restore Hooks, and much more!

Ashish Amarnath
September 16, 2020

Velero continues to evolve and gain adoption in the Kubernetes community. It is with pride and excitement that we announce the release of Velero 1.5.

With new features and functionalities, like using restic to backup pod volumes without adding annotations to pods, introducing the new DeleteItemAction plugin type, supporting hooks to customize restore operations, the broad theme for this release is operational ease.

We Stand Against Racism

Before diving into the features in this release, we would like to state explicitly that we stand in solidarity against racism and, to that effect, we have made the following changes to the Velero project:

  1. We have removed insensitive language from all of our documentation including those on our website velero.io.
  2. All of our repositories, including the Velero and plugins repositories, now use main as their default branch.
  3. The development images pushed to Velero docker hub on every PR merge now have the main tag. For example, the latest development image for velero is velero/velero:main.

If we have missed addressing insensitive verbiage anywhere, please let us know on the #velero slack channel or by creating issues on github and we will address it immediately.

Release Highlights

Auto Volume Backup Using Restic

Prior to this release, Velero only supported opt-in behavior to backup pod volumes using restic that required users to individually annotate their pod spec with the volumes to backup up using restic. This was frequently raised in the community as a pain point and many users built automation to add the necessary annotations.

With the release of 1.5, Velero now has the ability to backup all pod volumes using restic, without having to individually annotate every pod. This feature allows users to backup all pod volumes, by default, using restic, except for:

  1. Volumes mounting the default service account token
  2. Hostpath volumes
  3. Volumes mounting Kubernetes secrets and config maps.

You can enable this feature on a per backup basis or as a default setting for all Velero backups. Read more about this feature on our restic integration page on our documentation website.

DeleteItemAction Plugins: A new way to customize Velero

Plugins in Velero are independent binaries that you can use to customize Velero’s behavior. In this release, we introduce a new plugin type, DeleteItemAction plugin, that offers yet another extension point to customize Velero’s functionality. This is in addition to the already existing ObjectStore plugin, VolumeSnapshotter plugin, BackupItemAction, and RestoreItemAction plugin types.

The velero-plugin-for-csi introduced a new pattern for backing up and restoring volume snapshots using BackupItemAction and RestoreItemAction plugins. To allow the community to adopt a similar pattern for their custom resources, Velero had to provide an extension point to clean up both in-cluster and external resources, created by their BackupItemAction plugins. This is now possible with DeleteItemAction plugins. The interface for this new plugin type is similar to that of BackupItemAction and RestoreItemAction plugins. You can read more about the design for this plugin in the design documents of our repository on github.

Code Mordernization

Velero has been helping its users with disaster recovery for their Kubernetes clusters since its first release in August 2017. Over the past three years, there have been major improvements in the ecosystem, including new frameworks that make it easier to develop solutions for Kubernetes. This release marks the first steps in our journey to modernize the Velero codebase and take advantage of newer frameworks as we begin the adoption of kubebuilder, the most popular framework to build custom Kubernetes APIs and their respective controllers. As this effort continues, we would like to invite more folks to be a part of our growing contributor base.

Staying on the theme of using tools that are current and growing our contributor base: thanks to our community member and first-time contributor @RobReus, Velero now uses docker buildx to build multi-arch images for Velero. You can read more about this on our documentation website and docker’s documentation.

Restore Hooks

Using Velero’s Backup Hooks functionality, users can quiesce and un-quiesce applications before and after backup operations. This allows users to take application consistent backups of volume data. However, similar functionality to perform custom actions during or after a restore operation was unavailable. This led our users to build custom extensions outside of Velero as a workaround.

Driven wholly by the Velero community, we have a design for the missing Restore Hooks functionality. Thank you to our community members @marccampbell and @areed for driving the design proposal, and to everyone who participated in the design discussions and reviews. In the design, there are two kinds of Restore Hooks:

  1. InitContainer Restore Hooks: These will add init containers into restored pods to perform any necessary setup before the application containers of the restored pod can start.
  2. Exec Restore Hooks: These can be used to execute custom commands or scripts in containers of a restored Kubernetes pod.

You can find more details about the design in the design document for this feature.

Ordered backup of resources

Velero can specify a custom order in which resources can be backed up. Thanks to our community member @phuongatemc for driving this functionality from design to implementation. This is going to serve as a building block to support backup and restore of certain stateful applications. Here is the design document for the enhancement.

These were just some highlights of the release. You can always find more information about the release in the release change log. See the 1.5 upgrade instructions to start planning your upgrade today.

Join the Community and Make Velero Better

Velero is better because of our contributors and maintainers. It is because of you that we can bring great software to the community. Please join us during our online community meetings every Tuesday and catch up with past meetings on YouTube on the Velero Community Meetings playlist.

You can always find the latest project information at velero.io. Look for issues on GitHub marked Good first issue or Help wanted if you want to roll up your sleeves and write some code with us.

You can chat with us on Kubernetes Slack in the #velero channel and follow us on Twitter at @projectvelero.

Related Content
How to use CSI Volume Snapshotting with Velero
How to use CSI Volume Snapshotting with Velero
In the Velero 1.4 release, we introduced support for CSI snapshotting v1beta1 APIs. This post provides step-by-step instructions on setting up a CSI environment in Azure, installing Velero 1.4 with the velero-plugin-for-csi, and a demo of this feature in action.
Velero 1.3: Improved CRD Backups/Restores, Multi-Arch Docker Images, and More!
Velero 1.3: Improved CRD Backups/Restores, Multi-Arch Docker Images, and More!
Velero 1.3 includes improvements to CRD backups and restores, multi-arch Docker images including support for arm/arm64 and ppc64le, and many other usability and stability enhancements. This release includes significant contributions by community members, and we’re thrilled to be able to partner with you all in continuing to improve Velero.
Getting Started

To help you get started, see the documentation.