Documentation ¶
Index ¶
- type APIServiceAction
- type AddPVCFromPodAction
- type AddPVFromPVCAction
- type AdmissionWebhookConfigurationAction
- type CRDV1PreserveUnknownFieldsAction
- type ChangeImageNameAction
- type ChangePVCNodeSelectorAction
- type ChangeStorageClassAction
- type ChosenGroupVersion
- type ClusterRoleBindingAction
- type DataUploadRetrieveAction
- type InitRestoreHookPodAction
- type JobAction
- type PVRestorer
- type PodAction
- type PodVolumeRestoreAction
- type Priorities
- type Request
- type Restorer
- type RoleBindingAction
- type SecretAction
- type ServiceAccountAction
- type ServiceAction
- type VolumeSnapshotterGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServiceAction ¶ added in v1.6.3
type APIServiceAction struct {
// contains filtered or unexported fields
}
func NewAPIServiceAction ¶ added in v1.6.3
func NewAPIServiceAction(logger logrus.FieldLogger) *APIServiceAction
NewAPIServiceAction returns an APIServiceAction which is a RestoreItemAction plugin that will skip the restore of any APIServices which are managed by Kubernetes. This is determined by looking for the "kube-aggregator.kubernetes.io/automanaged" label on the APIService.
func (*APIServiceAction) AppliesTo ¶ added in v1.6.3
func (a *APIServiceAction) AppliesTo() (velero.ResourceSelector, error)
func (*APIServiceAction) Execute ¶ added in v1.6.3
func (a *APIServiceAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type AddPVCFromPodAction ¶ added in v1.0.0
type AddPVCFromPodAction struct {
// contains filtered or unexported fields
}
func NewAddPVCFromPodAction ¶ added in v1.0.0
func NewAddPVCFromPodAction(logger logrus.FieldLogger) *AddPVCFromPodAction
func (*AddPVCFromPodAction) AppliesTo ¶ added in v1.0.0
func (a *AddPVCFromPodAction) AppliesTo() (velero.ResourceSelector, error)
func (*AddPVCFromPodAction) Execute ¶ added in v1.0.0
func (a *AddPVCFromPodAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type AddPVFromPVCAction ¶ added in v1.0.0
type AddPVFromPVCAction struct {
// contains filtered or unexported fields
}
func NewAddPVFromPVCAction ¶ added in v1.0.0
func NewAddPVFromPVCAction(logger logrus.FieldLogger) *AddPVFromPVCAction
func (*AddPVFromPVCAction) AppliesTo ¶ added in v1.0.0
func (a *AddPVFromPVCAction) AppliesTo() (velero.ResourceSelector, error)
func (*AddPVFromPVCAction) Execute ¶ added in v1.0.0
func (a *AddPVFromPVCAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type AdmissionWebhookConfigurationAction ¶ added in v1.8.0
type AdmissionWebhookConfigurationAction struct {
// contains filtered or unexported fields
}
AdmissionWebhookConfigurationAction is a RestoreItemAction plugin applicable to mutatingwebhookconfiguration and validatingwebhookconfiguration to reset the invalid value for "sideEffects" of the webhooks. More background please refer to https://github.com/vmware-tanzu/velero/issues/3516
func NewAdmissionWebhookConfigurationAction ¶ added in v1.8.0
func NewAdmissionWebhookConfigurationAction(logger logrus.FieldLogger) *AdmissionWebhookConfigurationAction
NewAdmissionWebhookConfigurationAction creates a new instance of AdmissionWebhookConfigurationAction
func (*AdmissionWebhookConfigurationAction) AppliesTo ¶ added in v1.8.0
func (a *AdmissionWebhookConfigurationAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo implements the RestoreItemAction plugin interface method.
func (*AdmissionWebhookConfigurationAction) Execute ¶ added in v1.8.0
func (a *AdmissionWebhookConfigurationAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute will reset the value of "sideEffects" attribute of each item in the "webhooks" list to "None" if they are invalid values for v1, such as "Unknown" or "Some"
type CRDV1PreserveUnknownFieldsAction ¶ added in v1.3.0
type CRDV1PreserveUnknownFieldsAction struct {
// contains filtered or unexported fields
}
CRDV1PreserveUnknownFieldsAction will take a CRD and inspect it for the API version and the PreserveUnknownFields value. If the API Version is 1 and the PreserveUnknownFields value is True, then the x-preserve-unknown-fields value in the OpenAPIV3 schema will be set to True and PreserveUnknownFields set to False in order to allow Kubernetes 1.16+ servers to accept the object.
func NewCRDV1PreserveUnknownFieldsAction ¶ added in v1.3.0
func NewCRDV1PreserveUnknownFieldsAction(logger logrus.FieldLogger) *CRDV1PreserveUnknownFieldsAction
func (*CRDV1PreserveUnknownFieldsAction) AppliesTo ¶ added in v1.3.0
func (c *CRDV1PreserveUnknownFieldsAction) AppliesTo() (velero.ResourceSelector, error)
func (*CRDV1PreserveUnknownFieldsAction) Execute ¶ added in v1.3.0
func (c *CRDV1PreserveUnknownFieldsAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type ChangeImageNameAction ¶ added in v1.11.0
type ChangeImageNameAction struct {
// contains filtered or unexported fields
}
ChangeImageNameAction updates a deployment or Pod's image name if a mapping is found in the plugin's config map.
func NewChangeImageNameAction ¶ added in v1.11.0
func NewChangeImageNameAction( logger logrus.FieldLogger, configMapClient corev1client.ConfigMapInterface, ) *ChangeImageNameAction
NewChangeImageNameAction is the constructor for ChangeImageNameAction.
func (*ChangeImageNameAction) AppliesTo ¶ added in v1.11.0
func (a *ChangeImageNameAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns the resources that ChangeImageNameAction should be run for.
func (*ChangeImageNameAction) Execute ¶ added in v1.11.0
func (a *ChangeImageNameAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute updates the item's spec.containers' image if a mapping is found in the config map for the plugin.
type ChangePVCNodeSelectorAction ¶ added in v1.4.0
type ChangePVCNodeSelectorAction struct {
// contains filtered or unexported fields
}
ChangePVCNodeSelectorAction updates/reset PVC's node selector if a mapping is found in the plugin's config map.
func NewChangePVCNodeSelectorAction ¶ added in v1.4.0
func NewChangePVCNodeSelectorAction( logger logrus.FieldLogger, configMapClient corev1client.ConfigMapInterface, nodeClient corev1client.NodeInterface, ) *ChangePVCNodeSelectorAction
NewChangePVCNodeSelectorAction is the constructor for ChangePVCNodeSelectorAction.
func (*ChangePVCNodeSelectorAction) AppliesTo ¶ added in v1.4.0
func (p *ChangePVCNodeSelectorAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns the resources that ChangePVCNodeSelectorAction should be run for
func (*ChangePVCNodeSelectorAction) Execute ¶ added in v1.4.0
func (p *ChangePVCNodeSelectorAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute updates the pvc's selected-node annotation:
a) if node mapping found in the config map for the plugin b) if node mentioned in annotation doesn't exist
type ChangeStorageClassAction ¶ added in v1.0.1
type ChangeStorageClassAction struct {
// contains filtered or unexported fields
}
ChangeStorageClassAction updates a PV or PVC's storage class name if a mapping is found in the plugin's config map.
func NewChangeStorageClassAction ¶ added in v1.0.1
func NewChangeStorageClassAction( logger logrus.FieldLogger, configMapClient corev1client.ConfigMapInterface, storageClassClient storagev1client.StorageClassInterface, ) *ChangeStorageClassAction
NewChangeStorageClassAction is the constructor for ChangeStorageClassAction.
func (*ChangeStorageClassAction) AppliesTo ¶ added in v1.0.1
func (a *ChangeStorageClassAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns the resources that ChangeStorageClassAction should be run for.
func (*ChangeStorageClassAction) Execute ¶ added in v1.0.1
func (a *ChangeStorageClassAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute updates the item's spec.storageClassName if a mapping is found in the config map for the plugin.
type ChosenGroupVersion ¶ added in v1.6.0
ChosenGroupVersion is the API Group version that was selected to restore from potentially multiple backed up version enabled by the feature flag APIGroupVersionsFeatureFlag
type ClusterRoleBindingAction ¶ added in v1.2.0
type ClusterRoleBindingAction struct {
// contains filtered or unexported fields
}
ClusterRoleBindingAction handle namespace remappings for role bindings
func NewClusterRoleBindingAction ¶ added in v1.2.0
func NewClusterRoleBindingAction(logger logrus.FieldLogger) *ClusterRoleBindingAction
func (*ClusterRoleBindingAction) AppliesTo ¶ added in v1.2.0
func (a *ClusterRoleBindingAction) AppliesTo() (velero.ResourceSelector, error)
func (*ClusterRoleBindingAction) Execute ¶ added in v1.2.0
func (a *ClusterRoleBindingAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type DataUploadRetrieveAction ¶ added in v1.12.0
type DataUploadRetrieveAction struct {
// contains filtered or unexported fields
}
func NewDataUploadRetrieveAction ¶ added in v1.12.0
func NewDataUploadRetrieveAction(logger logrus.FieldLogger, client client.Client) *DataUploadRetrieveAction
func (*DataUploadRetrieveAction) AppliesTo ¶ added in v1.12.0
func (d *DataUploadRetrieveAction) AppliesTo() (velero.ResourceSelector, error)
func (*DataUploadRetrieveAction) Execute ¶ added in v1.12.0
func (d *DataUploadRetrieveAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type InitRestoreHookPodAction ¶ added in v1.5.0
type InitRestoreHookPodAction struct {
// contains filtered or unexported fields
}
InitRestoreHookPodAction is a RestoreItemAction plugin applicable to pods that runs restore hooks to add init containers to pods prior to them being restored.
func NewInitRestoreHookPodAction ¶ added in v1.5.0
func NewInitRestoreHookPodAction(logger logrus.FieldLogger) *InitRestoreHookPodAction
NewInitRestoreHookPodAction returns a new InitRestoreHookPodAction.
func (*InitRestoreHookPodAction) AppliesTo ¶ added in v1.5.0
func (a *InitRestoreHookPodAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo implements the RestoreItemAction plugin interface method.
func (*InitRestoreHookPodAction) Execute ¶ added in v1.5.0
func (a *InitRestoreHookPodAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute implements the RestoreItemAction plugin interface method.
type JobAction ¶ added in v1.0.0
type JobAction struct {
// contains filtered or unexported fields
}
func NewJobAction ¶ added in v0.6.0
func NewJobAction(logger logrus.FieldLogger) *JobAction
func (*JobAction) AppliesTo ¶ added in v1.0.0
func (a *JobAction) AppliesTo() (velero.ResourceSelector, error)
func (*JobAction) Execute ¶ added in v1.0.0
func (a *JobAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type PVRestorer ¶ added in v0.9.0
type PVRestorer interface {
// contains filtered or unexported methods
}
type PodAction ¶ added in v1.0.0
type PodAction struct {
// contains filtered or unexported fields
}
func NewPodAction ¶ added in v0.6.0
func NewPodAction(logger logrus.FieldLogger) *PodAction
func (*PodAction) AppliesTo ¶ added in v1.0.0
func (a *PodAction) AppliesTo() (velero.ResourceSelector, error)
func (*PodAction) Execute ¶ added in v1.0.0
func (a *PodAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type PodVolumeRestoreAction ¶ added in v1.10.0
type PodVolumeRestoreAction struct {
// contains filtered or unexported fields
}
func NewPodVolumeRestoreAction ¶ added in v1.10.0
func NewPodVolumeRestoreAction(logger logrus.FieldLogger, client corev1client.ConfigMapInterface, crClient ctrlclient.Client) *PodVolumeRestoreAction
func (*PodVolumeRestoreAction) AppliesTo ¶ added in v1.10.0
func (a *PodVolumeRestoreAction) AppliesTo() (velero.ResourceSelector, error)
func (*PodVolumeRestoreAction) Execute ¶ added in v1.10.0
func (a *PodVolumeRestoreAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type Priorities ¶ added in v1.9.3
Priorities defines the desired order of resource operations: Resources in the HighPriorities list will be handled first Resources in the LowPriorities list will be handled last Other resources will be handled alphabetically after the high prioritized resources and before the low prioritized resources
func (*Priorities) Set ¶ added in v1.9.3
func (p *Priorities) Set(s string) error
Set parses the provided string to the priority object
func (*Priorities) String ¶ added in v1.9.3
func (p *Priorities) String() string
String returns a string representation of Priority.
func (*Priorities) Type ¶ added in v1.9.3
func (p *Priorities) Type() string
Type specifies the flag type
type Request ¶ added in v1.0.1
type Request struct { *velerov1api.Restore Log logrus.FieldLogger Backup *velerov1api.Backup PodVolumeBackups []*velerov1api.PodVolumeBackup VolumeSnapshots []*volume.Snapshot BackupReader io.Reader RestoredItems map[itemKey]restoredItemStatus ResourceModifiers *resourcemodifiers.ResourceModifiers DisableInformerCache bool CSIVolumeSnapshots []*snapshotv1api.VolumeSnapshot VolumeInfoMap map[string]internalVolume.VolumeInfo // contains filtered or unexported fields }
func (*Request) GetItemOperationsList ¶ added in v1.11.0
func (r *Request) GetItemOperationsList() *[]*itemoperation.RestoreOperation
GetItemOperationsList returns ItemOperationsList, initializing it if necessary
func (*Request) RestoredResourceList ¶ added in v1.11.0
RestoredResourceList returns the list of restored resources grouped by the API Version and Kind
type Restorer ¶
type Restorer interface { // Restore restores the backup data from backupReader, returning warnings and errors. Restore(req *Request, actions []riav2.RestoreItemAction, volumeSnapshotterGetter VolumeSnapshotterGetter, ) (results.Result, results.Result) RestoreWithResolvers( req *Request, restoreItemActionResolver framework.RestoreItemActionResolverV2, volumeSnapshotterGetter VolumeSnapshotterGetter, ) (results.Result, results.Result) }
Restorer knows how to restore a backup.
func NewKubernetesRestorer ¶
func NewKubernetesRestorer( discoveryHelper discovery.Helper, dynamicFactory client.DynamicFactory, resourcePriorities Priorities, namespaceClient corev1.NamespaceInterface, podVolumeRestorerFactory podvolume.RestorerFactory, podVolumeTimeout time.Duration, resourceTerminatingTimeout time.Duration, resourceTimeout time.Duration, logger logrus.FieldLogger, podCommandExecutor podexec.PodCommandExecutor, podGetter cache.Getter, credentialStore credentials.FileStore, kbClient crclient.Client, featureVerifier features.Verifier, ) (Restorer, error)
NewKubernetesRestorer creates a new kubernetesRestorer.
type RoleBindingAction ¶ added in v1.2.0
type RoleBindingAction struct {
// contains filtered or unexported fields
}
RoleBindingAction handle namespace remappings for role bindings
func NewRoleBindingAction ¶ added in v1.2.0
func NewRoleBindingAction(logger logrus.FieldLogger) *RoleBindingAction
func (*RoleBindingAction) AppliesTo ¶ added in v1.2.0
func (a *RoleBindingAction) AppliesTo() (velero.ResourceSelector, error)
func (*RoleBindingAction) Execute ¶ added in v1.2.0
func (a *RoleBindingAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type SecretAction ¶ added in v1.10.2
type SecretAction struct {
// contains filtered or unexported fields
}
SecretAction is a restore item action for secrets
func NewSecretAction ¶ added in v1.10.2
func NewSecretAction(logger logrus.FieldLogger, client client.Client) *SecretAction
NewSecretAction creates a new SecretAction instance
func (*SecretAction) AppliesTo ¶ added in v1.10.2
func (s *SecretAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo indicates which resources this action applies
func (*SecretAction) Execute ¶ added in v1.10.2
func (s *SecretAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute the action
type ServiceAccountAction ¶ added in v1.0.0
type ServiceAccountAction struct {
// contains filtered or unexported fields
}
func NewServiceAccountAction ¶ added in v0.10.1
func NewServiceAccountAction(logger logrus.FieldLogger) *ServiceAccountAction
func (*ServiceAccountAction) AppliesTo ¶ added in v1.0.0
func (a *ServiceAccountAction) AppliesTo() (velero.ResourceSelector, error)
func (*ServiceAccountAction) Execute ¶ added in v1.0.0
func (a *ServiceAccountAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type ServiceAction ¶ added in v1.0.0
type ServiceAction struct {
// contains filtered or unexported fields
}
func NewServiceAction ¶ added in v0.6.0
func NewServiceAction(logger logrus.FieldLogger) *ServiceAction
func (*ServiceAction) AppliesTo ¶ added in v1.0.0
func (a *ServiceAction) AppliesTo() (velero.ResourceSelector, error)
func (*ServiceAction) Execute ¶ added in v1.0.0
func (a *ServiceAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type VolumeSnapshotterGetter ¶ added in v1.0.0
type VolumeSnapshotterGetter interface {
GetVolumeSnapshotter(name string) (vsv1.VolumeSnapshotter, error)
}
Source Files ¶
- add_pv_from_pvc_action.go
- add_pvc_from_pod_action.go
- admissionwebhook_config_action.go
- apiservice_action.go
- change_image_name_action.go
- change_pvc_node_selector.go
- change_storageclass_action.go
- clusterrolebinding_action.go
- crd_v1_preserve_unknown_fields_action.go
- dataupload_retrieve_action.go
- init_restorehook_pod_action.go
- job_action.go
- merge_service_account.go
- pod_action.go
- pod_volume_restore_action.go
- prioritize_group_version.go
- priority.go
- pv_restorer.go
- request.go
- restore.go
- rolebinding_action.go
- secret_action.go
- service_account_action.go
- service_action.go