actions

package
v0.0.0-...-1eaa894 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

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)

type AddPVCFromPodAction

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

func NewAddPVCFromPodAction

func NewAddPVCFromPodAction(logger logrus.FieldLogger) *AddPVCFromPodAction

func (*AddPVCFromPodAction) AppliesTo

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)

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

AppliesTo implements the RestoreItemAction plugin interface method.

func (*AdmissionWebhookConfigurationAction) Execute

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 (*CRDV1PreserveUnknownFieldsAction) Execute

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

AppliesTo returns the resources that ChangeImageNameAction should be run for.

func (*ChangeImageNameAction) Execute

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

AppliesTo returns the resources that ChangePVCNodeSelectorAction should be run for

func (*ChangePVCNodeSelectorAction) Execute

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

AppliesTo returns the resources that ChangeStorageClassAction should be run for.

func (*ChangeStorageClassAction) Execute

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

type DataUploadRetrieveAction

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

func NewDataUploadRetrieveAction

func NewDataUploadRetrieveAction(logger logrus.FieldLogger, client client.Client) *DataUploadRetrieveAction

func (*DataUploadRetrieveAction) AppliesTo

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

AppliesTo implements the RestoreItemAction plugin interface method.

func (*InitRestoreHookPodAction) Execute

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) AppliesTo

func (a *JobAction) AppliesTo() (velero.ResourceSelector, error)

type PodAction

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

func NewPodAction

func NewPodAction(logger logrus.FieldLogger) *PodAction

func (*PodAction) AppliesTo

func (a *PodAction) AppliesTo() (velero.ResourceSelector, error)

type PodVolumeRestoreAction

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

func (*PodVolumeRestoreAction) AppliesTo

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)

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

Execute the action

type ServiceAccountAction

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

func NewServiceAccountAction

func NewServiceAccountAction(logger logrus.FieldLogger) *ServiceAccountAction

func (*ServiceAccountAction) AppliesTo

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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