velero-plugin-for-vsphere-orig

module
v0.0.0-...-1b45e6a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2020 License: Apache-2.0

README

Velero Plugins for vSphere

First Tips

Please place the git repo under $GOPATH/src/github.com/vmware-tanzu/velero-plugin-for-vsphere.

Kinds of Plugins

Velero currently supports the following kinds of plugins:

  • Block Store - creates snapshots from volumes (during a backup) and volumes from snapshots (during a restore).

Building the plugin

To build the plugin, run

$ make

To build the image, run

$ make container

This builds an image tagged as velero/velero-plugin-for-vsphere. If you want to specify a different name, run

$ make container IMAGE=your-repo/your-name:here

Deploying the plugins

To deploy your plugin image to an Velero server:

  1. In the CSI setup, it is required to use the hostNetwork option for the deployment. Run kubectl patch deploy/velero -n velero --patch "$(cat deployment/patch-deployment-hostNetwork.yaml)".
  2. Make sure your image is pushed to a registry that is accessible to your cluster's nodes.
  3. Run velero plugin add <image>, e.g. velero plugin add velero/vsphere-plugin-for-velero

Using the plugins

When the plugin is deployed, it is only made available to use. To make the plugin effective, you must modify your configuration:

Volume snapshot storage:

  1. Run kubectl edit volumesnapshotlocation <location-name> -n <velero-namespace> e.g. kubectl edit volumesnapshotlocation default -n velero OR velero snapshot-location create <location-name> --provider <provider-name>
  2. Change the value of spec.provider to enable a Block Store plugin
  3. Save and quit. The plugin will be used for the next backup/restore

HOWTO

To run with the plugin, do the following:

  1. Run velero snapshot-location create example-default --provider velero.io/vsphere

  2. Run kubectl edit deployment/velero -n <velero-namespace>

  3. Change the value of spec.template.spec.args to look like the following:

          - args:
            - server
            - --default-volume-snapshot-locations
            - velero.io/vsphere:example-default
    

    Note: users can also run kubectl apply -f deployment/create-deployment-for-plugin.yaml to configure the deployment for the plugin, which is equivalent to steps 1 - 3 mentioned above.

  4. Run kubectl apply -f examples/demo-app.yaml to apply a sample nginx application that uses the example block store plugin. Note: This example works best on a virtual machine, as it uses the host's /tmp directory for data storage.

Directories

Path Synopsis
hack
pkg
apis/veleroplugin/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
buildinfo
Package buildinfo holds build-time information like the velero version.
Package buildinfo holds build-time information like the velero version.
cmd
generated/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
generated/clientset/versioned/typed/veleroplugin/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/veleroplugin/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
generated/crds
Package crds embeds the controller-tools generated CRD manifests
Package crds embeds the controller-tools generated CRD manifests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL