pvc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VSphereCSIProvisioner = "csi.vsphere.vmware.com"
	PEInfoPrefix          = "peinfo"
)
View Source
const (
	// ClaimBindingTimeout is how long claims have to become bound.
	ClaimBindingTimeout = 3 * time.Minute

	// Poll is how often to Poll an API object.
	Poll = 2 * time.Second

	// MigratedCSIVolumeAnnotation is the annotation on a pv provisoned by in-tree vcp but migrated to vsphere csi
	MigratedCSIVolumeAnnotation = "pv.kubernetes.io/migrated-to"
)

Variables

This section is empty.

Functions

func GetSnapConfigMapName

func GetSnapConfigMapName(pvc *core_v1.PersistentVolumeClaim) string

func NewPVCProtectedEntityTypeManagerFromConfig

func NewPVCProtectedEntityTypeManagerFromConfig(params map[string]interface{}, s3Config astrolabe.S3Config,
	logger logrus.FieldLogger) (astrolabe.ProtectedEntityTypeManager, error)

Creates a PVC ProtectectEntityTypeManager K8S configuration is provided through parameters restConfig - *rest.Config - if set, this will be used if restConfig is not set, masterURL and kubeConfigPath will be used. Either can be set

func NewProtectedEntityIDFromPVCName

func NewProtectedEntityIDFromPVCName(namespace string, pvcName string) astrolabe.ProtectedEntityID

func WaitForPersistentVolumeClaimPhase

func WaitForPersistentVolumeClaimPhase(ctx context.Context, phase v1.PersistentVolumeClaimPhase, c clientset.Interface, ns string, pvcName string, Poll, timeout time.Duration, logger logrus.FieldLogger) error

WaitForPersistentVolumeClaimPhase waits for a PersistentVolumeClaim to be in a specific phase or until timeout occurs, whichever comes first.

func WaitForPersistentVolumeClaimsPhase

func WaitForPersistentVolumeClaimsPhase(ctx context.Context, phase v1.PersistentVolumeClaimPhase, c clientset.Interface, ns string, pvcNames []string, Poll, timeout time.Duration, matchAny bool, logger logrus.FieldLogger) error

WaitForPersistentVolumeClaimsPhase waits for any (if matchAny is true) or all (if matchAny is false) PersistentVolumeClaims to be in a specific phase or until timeout occurs, whichever comes first.

Types

type PVCProtectedEntity

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

func (PVCProtectedEntity) DeleteSnapshot

func (this PVCProtectedEntity) DeleteSnapshot(ctx context.Context, snapshotToDelete astrolabe.ProtectedEntitySnapshotID, params map[string]map[string]interface{}) (bool, error)

func (PVCProtectedEntity) GetCombinedInfo

func (this PVCProtectedEntity) GetCombinedInfo(ctx context.Context) ([]astrolabe.ProtectedEntityInfo, error)

func (PVCProtectedEntity) GetComponents

func (this PVCProtectedEntity) GetComponents(ctx context.Context) ([]astrolabe.ProtectedEntity, error)

func (PVCProtectedEntity) GetDataReader

func (this PVCProtectedEntity) GetDataReader(ctx context.Context) (io.ReadCloser, error)

func (PVCProtectedEntity) GetID

func (PVCProtectedEntity) GetInfo

func (PVCProtectedEntity) GetInfoForSnapshot

func (PVCProtectedEntity) GetMetadataReader

func (this PVCProtectedEntity) GetMetadataReader(ctx context.Context) (io.ReadCloser, error)

func (PVCProtectedEntity) GetPVC

func (PVCProtectedEntity) ListSnapshots

func (PVCProtectedEntity) Overwrite

func (this PVCProtectedEntity) Overwrite(ctx context.Context, sourcePE astrolabe.ProtectedEntity, params map[string]map[string]interface{},
	overwriteComponents bool) error

func (PVCProtectedEntity) Snapshot

func (this PVCProtectedEntity) Snapshot(ctx context.Context, params map[string]map[string]interface{}) (astrolabe.ProtectedEntitySnapshotID, error)

type PVCProtectedEntityTypeManager

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

func (*PVCProtectedEntityTypeManager) Copy

func (*PVCProtectedEntityTypeManager) CopyFromInfo

func (*PVCProtectedEntityTypeManager) CreateFromMetadata

func (this *PVCProtectedEntityTypeManager) CreateFromMetadata(ctx context.Context, buf []byte,
	sourceSnapshotID astrolabe.ProtectedEntityID, componentSourcePETM astrolabe.ProtectedEntityTypeManager, cloneFromSnapshotNamespace string, cloneFromSnapshotName string, backupRepositoryName string) (astrolabe.ProtectedEntity, error)

CreateFromMetadata creates a new PVC (dynamic provisioning path) with serialized PVC info

func (*PVCProtectedEntityTypeManager) GetProtectedEntities

func (this *PVCProtectedEntityTypeManager) GetProtectedEntities(ctx context.Context) ([]astrolabe.ProtectedEntityID, error)

func (*PVCProtectedEntityTypeManager) GetProtectedEntity

func (*PVCProtectedEntityTypeManager) GetTypeName

func (this *PVCProtectedEntityTypeManager) GetTypeName() string

func (*PVCProtectedEntityTypeManager) SetProtectedEntityManager

func (this *PVCProtectedEntityTypeManager) SetProtectedEntityManager(pem astrolabe.ProtectedEntityManager)

Jump to

Keyboard shortcuts

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