Documentation ¶
Index ¶
- Constants
- func GetClient() (*kubernetes.Clientset, error)
- type BackupPluginV2
- func (p *BackupPluginV2) AppliesTo() (velero.ResourceSelector, error)
- func (p *BackupPluginV2) Cancel(operationID string, backup *v1.Backup) error
- func (p *BackupPluginV2) Execute(item runtime.Unstructured, backup *v1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, string, ...)
- func (p *BackupPluginV2) Name() string
- func (p *BackupPluginV2) Progress(operationID string, backup *v1.Backup) (velero.OperationProgress, error)
Constants ¶
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 ¶
func (p *BackupPluginV2) Execute(item runtime.Unstructured, backup *v1.Backup) (runtime.Unstructured, []velero.ResourceIdentifier, string, []velero.ResourceIdentifier, error)
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)