plugin

package
v0.0.0-...-d521bb7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// This annotation is a CSV string.
	// If this annotation is found on a backup resource, any container names
	// matching a value inside the CSV will not be backed up.
	AsyncBIAContainerPruneAnnotation = "velero.arilence.com/prune-containers"
)

Variables

This section is empty.

Functions

func GetClient

func GetClient() (*kubernetes.Clientset, error)

Types

type BackupPluginV2

type BackupPluginV2 struct {
	// contains filtered or unexported fields
}

BackupPluginV2 is a v2 backup item action plugin for Velero.

func NewBackupPluginV2

func NewBackupPluginV2(log logrus.FieldLogger) *BackupPluginV2

NewBackupPluginV2 instantiates a v2 BackupPlugin.

func (*BackupPluginV2) AppliesTo

func (p *BackupPluginV2) AppliesTo() (velero.ResourceSelector, error)

AppliesTo returns information about which resources this action should be invoked for. The IncludedResources and ExcludedResources slices can include both resources and resources with group names. These work: "ingresses", "ingresses.extensions". A BackupPlugin's Execute function will only be invoked on items that match the returned selector. A zero-valued ResourceSelector matches all resources.

func (*BackupPluginV2) Cancel

func (p *BackupPluginV2) Cancel(operationID string, backup *v1.Backup) error

func (*BackupPluginV2) Execute

Execute allows the ItemAction to perform arbitrary logic with the item being backed up, in this case, setting a custom annotation on the item being backed up.

func (*BackupPluginV2) Name

func (p *BackupPluginV2) Name() string

Name is required to implement the interface, but the Velero pod does not delegate this method -- it's used to tell velero what name it was registered under. The plugin implementation must define it, but it will never actually be called.

func (*BackupPluginV2) Progress

func (p *BackupPluginV2) Progress(operationID string, backup *v1.Backup) (velero.OperationProgress, error)

Jump to

Keyboard shortcuts

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