Documentation ¶
Index ¶
- Constants
- func GetSnapConfigMapName(pvc *core_v1.PersistentVolumeClaim) string
- func NewPVCProtectedEntityTypeManagerFromConfig(params map[string]interface{}, s3Config astrolabe.S3Config, ...) (astrolabe.ProtectedEntityTypeManager, error)
- func NewProtectedEntityIDFromPVCName(namespace string, pvcName string) astrolabe.ProtectedEntityID
- func WaitForPersistentVolumeClaimPhase(ctx context.Context, phase v1.PersistentVolumeClaimPhase, ...) error
- func WaitForPersistentVolumeClaimsPhase(ctx context.Context, phase v1.PersistentVolumeClaimPhase, ...) error
- type PVCProtectedEntity
- func (this PVCProtectedEntity) DeleteSnapshot(ctx context.Context, snapshotToDelete astrolabe.ProtectedEntitySnapshotID, ...) (bool, error)
- func (this PVCProtectedEntity) GetCombinedInfo(ctx context.Context) ([]astrolabe.ProtectedEntityInfo, error)
- func (this PVCProtectedEntity) GetComponents(ctx context.Context) ([]astrolabe.ProtectedEntity, error)
- func (this PVCProtectedEntity) GetDataReader(ctx context.Context) (io.ReadCloser, error)
- func (this PVCProtectedEntity) GetID() astrolabe.ProtectedEntityID
- func (this PVCProtectedEntity) GetInfo(ctx context.Context) (astrolabe.ProtectedEntityInfo, error)
- func (this PVCProtectedEntity) GetInfoForSnapshot(ctx context.Context, snapshotID astrolabe.ProtectedEntitySnapshotID) (*astrolabe.ProtectedEntityInfo, error)
- func (this PVCProtectedEntity) GetMetadataReader(ctx context.Context) (io.ReadCloser, error)
- func (this PVCProtectedEntity) GetPVC(ctx context.Context) (*core_v1.PersistentVolumeClaim, error)
- func (this PVCProtectedEntity) ListSnapshots(ctx context.Context) ([]astrolabe.ProtectedEntitySnapshotID, error)
- func (this PVCProtectedEntity) Overwrite(ctx context.Context, sourcePE astrolabe.ProtectedEntity, ...) error
- func (this PVCProtectedEntity) Snapshot(ctx context.Context, params map[string]map[string]interface{}) (astrolabe.ProtectedEntitySnapshotID, error)
- type PVCProtectedEntityTypeManager
- func (this *PVCProtectedEntityTypeManager) Copy(ctx context.Context, pe astrolabe.ProtectedEntity, ...) (astrolabe.ProtectedEntity, error)
- func (this *PVCProtectedEntityTypeManager) CopyFromInfo(ctx context.Context, info astrolabe.ProtectedEntityInfo, ...) (astrolabe.ProtectedEntity, error)
- func (this *PVCProtectedEntityTypeManager) CreateFromMetadata(ctx context.Context, buf []byte, sourceSnapshotID astrolabe.ProtectedEntityID, ...) (astrolabe.ProtectedEntity, error)
- func (this *PVCProtectedEntityTypeManager) GetProtectedEntities(ctx context.Context) ([]astrolabe.ProtectedEntityID, error)
- func (this *PVCProtectedEntityTypeManager) GetProtectedEntity(ctx context.Context, peid astrolabe.ProtectedEntityID) (astrolabe.ProtectedEntity, error)
- func (this *PVCProtectedEntityTypeManager) GetTypeName() string
- func (this *PVCProtectedEntityTypeManager) SetProtectedEntityManager(pem astrolabe.ProtectedEntityManager)
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 (this PVCProtectedEntity) GetID() astrolabe.ProtectedEntityID
func (PVCProtectedEntity) GetInfo ¶
func (this PVCProtectedEntity) GetInfo(ctx context.Context) (astrolabe.ProtectedEntityInfo, error)
func (PVCProtectedEntity) GetInfoForSnapshot ¶
func (this PVCProtectedEntity) GetInfoForSnapshot(ctx context.Context, snapshotID astrolabe.ProtectedEntitySnapshotID) (*astrolabe.ProtectedEntityInfo, error)
func (PVCProtectedEntity) GetMetadataReader ¶
func (this PVCProtectedEntity) GetMetadataReader(ctx context.Context) (io.ReadCloser, error)
func (PVCProtectedEntity) GetPVC ¶
func (this PVCProtectedEntity) GetPVC(ctx context.Context) (*core_v1.PersistentVolumeClaim, error)
func (PVCProtectedEntity) ListSnapshots ¶
func (this PVCProtectedEntity) ListSnapshots(ctx context.Context) ([]astrolabe.ProtectedEntitySnapshotID, error)
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 (this *PVCProtectedEntityTypeManager) Copy(ctx context.Context, pe astrolabe.ProtectedEntity, params map[string]map[string]interface{}, options astrolabe.CopyCreateOptions) (astrolabe.ProtectedEntity, error)
func (*PVCProtectedEntityTypeManager) CopyFromInfo ¶
func (this *PVCProtectedEntityTypeManager) CopyFromInfo(ctx context.Context, info astrolabe.ProtectedEntityInfo, params map[string]map[string]interface{}, options astrolabe.CopyCreateOptions) (astrolabe.ProtectedEntity, error)
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 (this *PVCProtectedEntityTypeManager) GetProtectedEntity(ctx context.Context, peid astrolabe.ProtectedEntityID) (astrolabe.ProtectedEntity, error)
func (*PVCProtectedEntityTypeManager) GetTypeName ¶
func (this *PVCProtectedEntityTypeManager) GetTypeName() string
func (*PVCProtectedEntityTypeManager) SetProtectedEntityManager ¶
func (this *PVCProtectedEntityTypeManager) SetProtectedEntityManager(pem astrolabe.ProtectedEntityManager)
Click to show internal directories.
Click to hide internal directories.