Documentation ¶
Index ¶
- Constants
- func Add(mgr manager.Manager) error
- type MultiversionSnapshot
- func GetMVSnapshot(ctx context.Context, client client.Reader, key types.NamespacedName) (*MultiversionSnapshot, error)
- func ListMVSnapshot(ctx context.Context, client client.Reader, opts ...client.ListOption) ([]MultiversionSnapshot, error)
- func WrapSnapshotAlpha(snap *snapv1alpha1.VolumeSnapshot) *MultiversionSnapshot
- func WrapSnapshotBeta(snap *snapv1beta1.VolumeSnapshot) *MultiversionSnapshot
- func (mvs *MultiversionSnapshot) Create(ctx context.Context, client client.Writer, opts ...client.CreateOption) error
- func (mvs *MultiversionSnapshot) Delete(ctx context.Context, client client.Writer, opts ...client.DeleteOption) error
- func (mvs *MultiversionSnapshot) ObjectMeta() *metav1.ObjectMeta
- func (mvs *MultiversionSnapshot) ReadyToUse() *bool
- func (mvs *MultiversionSnapshot) SnapshotClassName() *string
- func (mvs *MultiversionSnapshot) SourcePvcName() *string
- type ReconcileSnapshotSchedule
- type SnapshotVersionChecker
Constants ¶
const ( // ScheduleKey is a label applied to every snapshot created by // snap-scheduler, denoting the schedule that created it ScheduleKey = "snapscheduler.backube/schedule" // WhenKey is a label applied to every snapshot created by // snap-scheduler, denoting the scheduled (not actual) time of the snapshot WhenKey = "snapscheduler.backube/when" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MultiversionSnapshot ¶ added in v1.1.0
type MultiversionSnapshot struct {
// contains filtered or unexported fields
}
MultiversionSnapshot abstracts the specific version of the VolumeSnapshot object.
func GetMVSnapshot ¶ added in v1.1.0
func GetMVSnapshot(ctx context.Context, client client.Reader, key types.NamespacedName) (*MultiversionSnapshot, error)
GetMVSnapshot retrieves the VolumeSnapshot with the provided key from the API server. We use this function because the standard client.Get cannot be used with an mvs.
func ListMVSnapshot ¶ added in v1.1.0
func ListMVSnapshot(ctx context.Context, client client.Reader, opts ...client.ListOption) ([]MultiversionSnapshot, error)
ListMVSnapshot takes the place of client.List for MultiversionSnapshot objects.
func WrapSnapshotAlpha ¶ added in v1.1.0
func WrapSnapshotAlpha(snap *snapv1alpha1.VolumeSnapshot) *MultiversionSnapshot
WrapSnapshotAlpha encapsulates a v1alpha1 VolumeSnapshot.
func WrapSnapshotBeta ¶ added in v1.1.0
func WrapSnapshotBeta(snap *snapv1beta1.VolumeSnapshot) *MultiversionSnapshot
WrapSnapshotBeta encapsulates a v1beta1 VolumeSnapshot.
func (*MultiversionSnapshot) Create ¶ added in v1.1.0
func (mvs *MultiversionSnapshot) Create(ctx context.Context, client client.Writer, opts ...client.CreateOption) error
Create saves the snapshot in the Kubernetes cluster.
func (*MultiversionSnapshot) Delete ¶ added in v1.1.0
func (mvs *MultiversionSnapshot) Delete(ctx context.Context, client client.Writer, opts ...client.DeleteOption) error
Delete deletes the snapshot from Kubernetes cluster.
func (*MultiversionSnapshot) ObjectMeta ¶ added in v1.1.0
func (mvs *MultiversionSnapshot) ObjectMeta() *metav1.ObjectMeta
ObjectMeta returns the metadata portion from the underlying VolumeSnapshot.
func (*MultiversionSnapshot) ReadyToUse ¶ added in v1.1.1
func (mvs *MultiversionSnapshot) ReadyToUse() *bool
ReadyToUse returns a boolean indicating whether the snapshot is ready to be used
func (*MultiversionSnapshot) SnapshotClassName ¶ added in v1.1.1
func (mvs *MultiversionSnapshot) SnapshotClassName() *string
SnapshotClassName returns the name of the SnapshotClass for this VolumeSnapshot
func (*MultiversionSnapshot) SourcePvcName ¶ added in v1.1.0
func (mvs *MultiversionSnapshot) SourcePvcName() *string
SourcePvcName returns the name of the PVC used as the source for the VolumeSnapshot.
type ReconcileSnapshotSchedule ¶
type ReconcileSnapshotSchedule struct {
// contains filtered or unexported fields
}
ReconcileSnapshotSchedule reconciles a SnapshotSchedule object
type SnapshotVersionChecker ¶ added in v1.1.0
type SnapshotVersionChecker struct {
// contains filtered or unexported fields
}
SnapshotVersionChecker keeps track of which VolumeSnapshot versions are valid in the API server.
var VersionChecker SnapshotVersionChecker
VersionChecker is the cache of valid VolumeSnapshot versions.