actions

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type PVCAction

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

PVCAction inspects a PersistentVolumeClaim for the PersistentVolume that it references and backs it up

func (*PVCAction) AppliesTo

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

func (*PVCAction) GetRelatedItems

func (a *PVCAction) GetRelatedItems(item runtime.Unstructured, backup *v1.Backup) ([]velero.ResourceIdentifier, error)

func (*PVCAction) Name

func (a *PVCAction) Name() string

type PodAction

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

PodAction implements ItemBlockAction.

func NewPodAction

func NewPodAction(logger logrus.FieldLogger) *PodAction

NewPodAction creates a new ItemBlockAction for pods.

func (*PodAction) AppliesTo

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

AppliesTo returns a ResourceSelector that applies only to pods.

func (*PodAction) GetRelatedItems

func (a *PodAction) GetRelatedItems(item runtime.Unstructured, backup *v1.Backup) ([]velero.ResourceIdentifier, error)

GetRelatedItems scans the pod's spec.volumes for persistentVolumeClaim volumes and returns a ResourceIdentifier list containing references to all of the persistentVolumeClaim volumes used by the pod. This ensures that when a pod is backed up, all referenced PVCs are backed up along with the pod.

func (*PodAction) Name

func (a *PodAction) Name() string

type ServiceAccountAction

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

ServiceAccountAction implements ItemBlockAction.

func NewServiceAccountAction

func NewServiceAccountAction(logger logrus.FieldLogger, clusterRoleBindingListers map[string]actionhelpers.ClusterRoleBindingLister, discoveryHelper velerodiscovery.Helper) (*ServiceAccountAction, error)

NewServiceAccountAction creates a new ItemBlockAction for service accounts.

func (*ServiceAccountAction) AppliesTo

AppliesTo returns a ResourceSelector that applies only to service accounts.

func (*ServiceAccountAction) GetRelatedItems

func (a *ServiceAccountAction) GetRelatedItems(item runtime.Unstructured, backup *v1.Backup) ([]velero.ResourceIdentifier, error)

GetRelatedItems checks for any ClusterRoleBindings that have this service account as a subject, and returns the ClusterRoleBinding and associated ClusterRole.

func (*ServiceAccountAction) Name

func (a *ServiceAccountAction) Name() string

Jump to

Keyboard shortcuts

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