Documentation ¶
Index ¶
- type APIServiceAction
- type AddPVCFromPodAction
- type AddPVFromPVCAction
- type AdmissionWebhookConfigurationAction
- type CRDV1PreserveUnknownFieldsAction
- type ChangeImageNameAction
- type ChangePVCNodeSelectorAction
- type ChangeStorageClassAction
- type ClusterRoleBindingAction
- type DataUploadRetrieveAction
- type InitRestoreHookPodAction
- type JobAction
- type PodAction
- type PodVolumeRestoreAction
- type RoleBindingAction
- type SecretAction
- type ServiceAccountAction
- type ServiceAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServiceAction ¶
type APIServiceAction struct {
// contains filtered or unexported fields
}
func NewAPIServiceAction ¶
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 ¶
func (a *APIServiceAction) AppliesTo() (velero.ResourceSelector, error)
func (*APIServiceAction) Execute ¶
func (a *APIServiceAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type AddPVCFromPodAction ¶
type AddPVCFromPodAction struct {
// contains filtered or unexported fields
}
func NewAddPVCFromPodAction ¶
func NewAddPVCFromPodAction(logger logrus.FieldLogger) *AddPVCFromPodAction
func (*AddPVCFromPodAction) AppliesTo ¶
func (a *AddPVCFromPodAction) AppliesTo() (velero.ResourceSelector, error)
func (*AddPVCFromPodAction) Execute ¶
func (a *AddPVCFromPodAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type AddPVFromPVCAction ¶
type AddPVFromPVCAction struct {
// contains filtered or unexported fields
}
func NewAddPVFromPVCAction ¶
func NewAddPVFromPVCAction(logger logrus.FieldLogger) *AddPVFromPVCAction
func (*AddPVFromPVCAction) AppliesTo ¶
func (a *AddPVFromPVCAction) AppliesTo() (velero.ResourceSelector, error)
func (*AddPVFromPVCAction) Execute ¶
func (a *AddPVFromPVCAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type AdmissionWebhookConfigurationAction ¶
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 ¶
func NewAdmissionWebhookConfigurationAction(logger logrus.FieldLogger) *AdmissionWebhookConfigurationAction
NewAdmissionWebhookConfigurationAction creates a new instance of AdmissionWebhookConfigurationAction
func (*AdmissionWebhookConfigurationAction) AppliesTo ¶
func (a *AdmissionWebhookConfigurationAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo implements the RestoreItemAction plugin interface method.
func (*AdmissionWebhookConfigurationAction) Execute ¶
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 ¶
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 ¶
func NewCRDV1PreserveUnknownFieldsAction(logger logrus.FieldLogger) *CRDV1PreserveUnknownFieldsAction
func (*CRDV1PreserveUnknownFieldsAction) AppliesTo ¶
func (c *CRDV1PreserveUnknownFieldsAction) AppliesTo() (velero.ResourceSelector, error)
func (*CRDV1PreserveUnknownFieldsAction) Execute ¶
func (c *CRDV1PreserveUnknownFieldsAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type ChangeImageNameAction ¶
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 ¶
func NewChangeImageNameAction( logger logrus.FieldLogger, configMapClient corev1client.ConfigMapInterface, ) *ChangeImageNameAction
NewChangeImageNameAction is the constructor for ChangeImageNameAction.
func (*ChangeImageNameAction) AppliesTo ¶
func (a *ChangeImageNameAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns the resources that ChangeImageNameAction should be run for.
func (*ChangeImageNameAction) Execute ¶
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 ¶
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 ¶
func NewChangePVCNodeSelectorAction( logger logrus.FieldLogger, configMapClient corev1client.ConfigMapInterface, nodeClient corev1client.NodeInterface, ) *ChangePVCNodeSelectorAction
NewChangePVCNodeSelectorAction is the constructor for ChangePVCNodeSelectorAction.
func (*ChangePVCNodeSelectorAction) AppliesTo ¶
func (p *ChangePVCNodeSelectorAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns the resources that ChangePVCNodeSelectorAction should be run for
func (*ChangePVCNodeSelectorAction) Execute ¶
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 ¶
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 ¶
func NewChangeStorageClassAction( logger logrus.FieldLogger, configMapClient corev1client.ConfigMapInterface, storageClassClient storagev1client.StorageClassInterface, ) *ChangeStorageClassAction
NewChangeStorageClassAction is the constructor for ChangeStorageClassAction.
func (*ChangeStorageClassAction) AppliesTo ¶
func (a *ChangeStorageClassAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo returns the resources that ChangeStorageClassAction should be run for.
func (*ChangeStorageClassAction) Execute ¶
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 ClusterRoleBindingAction ¶
type ClusterRoleBindingAction struct {
// contains filtered or unexported fields
}
ClusterRoleBindingAction handle namespace remappings for role bindings
func NewClusterRoleBindingAction ¶
func NewClusterRoleBindingAction(logger logrus.FieldLogger) *ClusterRoleBindingAction
func (*ClusterRoleBindingAction) AppliesTo ¶
func (a *ClusterRoleBindingAction) AppliesTo() (velero.ResourceSelector, error)
func (*ClusterRoleBindingAction) Execute ¶
func (a *ClusterRoleBindingAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type DataUploadRetrieveAction ¶
type DataUploadRetrieveAction struct {
// contains filtered or unexported fields
}
func NewDataUploadRetrieveAction ¶
func NewDataUploadRetrieveAction(logger logrus.FieldLogger, client client.Client) *DataUploadRetrieveAction
func (*DataUploadRetrieveAction) AppliesTo ¶
func (d *DataUploadRetrieveAction) AppliesTo() (velero.ResourceSelector, error)
func (*DataUploadRetrieveAction) Execute ¶
func (d *DataUploadRetrieveAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type InitRestoreHookPodAction ¶
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 ¶
func NewInitRestoreHookPodAction(logger logrus.FieldLogger) *InitRestoreHookPodAction
NewInitRestoreHookPodAction returns a new InitRestoreHookPodAction.
func (*InitRestoreHookPodAction) AppliesTo ¶
func (a *InitRestoreHookPodAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo implements the RestoreItemAction plugin interface method.
func (*InitRestoreHookPodAction) Execute ¶
func (a *InitRestoreHookPodAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute implements the RestoreItemAction plugin interface method.
type JobAction ¶
type JobAction struct {
// contains filtered or unexported fields
}
func NewJobAction ¶
func NewJobAction(logger logrus.FieldLogger) *JobAction
func (*JobAction) Execute ¶
func (a *JobAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type PodAction ¶
type PodAction struct {
// contains filtered or unexported fields
}
func NewPodAction ¶
func NewPodAction(logger logrus.FieldLogger) *PodAction
func (*PodAction) Execute ¶
func (a *PodAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type PodVolumeRestoreAction ¶
type PodVolumeRestoreAction struct {
// contains filtered or unexported fields
}
func NewPodVolumeRestoreAction ¶
func NewPodVolumeRestoreAction(logger logrus.FieldLogger, client corev1client.ConfigMapInterface, crClient ctrlclient.Client) *PodVolumeRestoreAction
func (*PodVolumeRestoreAction) AppliesTo ¶
func (a *PodVolumeRestoreAction) AppliesTo() (velero.ResourceSelector, error)
func (*PodVolumeRestoreAction) Execute ¶
func (a *PodVolumeRestoreAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type RoleBindingAction ¶
type RoleBindingAction struct {
// contains filtered or unexported fields
}
RoleBindingAction handle namespace remappings for role bindings
func NewRoleBindingAction ¶
func NewRoleBindingAction(logger logrus.FieldLogger) *RoleBindingAction
func (*RoleBindingAction) AppliesTo ¶
func (a *RoleBindingAction) AppliesTo() (velero.ResourceSelector, error)
func (*RoleBindingAction) Execute ¶
func (a *RoleBindingAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type SecretAction ¶
type SecretAction struct {
// contains filtered or unexported fields
}
SecretAction is a restore item action for secrets
func NewSecretAction ¶
func NewSecretAction(logger logrus.FieldLogger, client client.Client) *SecretAction
NewSecretAction creates a new SecretAction instance
func (*SecretAction) AppliesTo ¶
func (s *SecretAction) AppliesTo() (velero.ResourceSelector, error)
AppliesTo indicates which resources this action applies
func (*SecretAction) Execute ¶
func (s *SecretAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
Execute the action
type ServiceAccountAction ¶
type ServiceAccountAction struct {
// contains filtered or unexported fields
}
func NewServiceAccountAction ¶
func NewServiceAccountAction(logger logrus.FieldLogger) *ServiceAccountAction
func (*ServiceAccountAction) AppliesTo ¶
func (a *ServiceAccountAction) AppliesTo() (velero.ResourceSelector, error)
func (*ServiceAccountAction) Execute ¶
func (a *ServiceAccountAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, error)
type ServiceAction ¶
type ServiceAction struct {
// contains filtered or unexported fields
}
func NewServiceAction ¶
func NewServiceAction(logger logrus.FieldLogger) *ServiceAction
func (*ServiceAction) AppliesTo ¶
func (a *ServiceAction) AppliesTo() (velero.ResourceSelector, error)
func (*ServiceAction) Execute ¶
func (a *ServiceAction) Execute(input *velero.RestoreItemActionExecuteInput) (*velero.RestoreItemActionExecuteOutput, 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
- pod_action.go
- pod_volume_restore_action.go
- rolebinding_action.go
- secret_action.go
- service_account_action.go
- service_action.go