Documentation ¶
Index ¶
- Constants
- 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 SnapshotScheduleReconciler
- 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 ¶
This section is empty.
Types ¶
type MultiversionSnapshot ¶
type MultiversionSnapshot struct {
// contains filtered or unexported fields
}
MultiversionSnapshot abstracts the specific version of the VolumeSnapshot object.
func GetMVSnapshot ¶
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 ¶
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 ¶
func WrapSnapshotAlpha(snap *snapv1alpha1.VolumeSnapshot) *MultiversionSnapshot
WrapSnapshotAlpha encapsulates a v1alpha1 VolumeSnapshot.
func WrapSnapshotBeta ¶
func WrapSnapshotBeta(snap *snapv1beta1.VolumeSnapshot) *MultiversionSnapshot
WrapSnapshotBeta encapsulates a v1beta1 VolumeSnapshot.
func (*MultiversionSnapshot) Create ¶
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 ¶
func (mvs *MultiversionSnapshot) Delete(ctx context.Context, client client.Writer, opts ...client.DeleteOption) error
Delete deletes the snapshot from Kubernetes cluster.
func (*MultiversionSnapshot) ObjectMeta ¶
func (mvs *MultiversionSnapshot) ObjectMeta() *metav1.ObjectMeta
ObjectMeta returns the metadata portion from the underlying VolumeSnapshot.
func (*MultiversionSnapshot) ReadyToUse ¶
func (mvs *MultiversionSnapshot) ReadyToUse() *bool
ReadyToUse returns a boolean indicating whether the snapshot is ready to be used
func (*MultiversionSnapshot) SnapshotClassName ¶
func (mvs *MultiversionSnapshot) SnapshotClassName() *string
SnapshotClassName returns the name of the SnapshotClass for this VolumeSnapshot
func (*MultiversionSnapshot) SourcePvcName ¶
func (mvs *MultiversionSnapshot) SourcePvcName() *string
SourcePvcName returns the name of the PVC used as the source for the VolumeSnapshot.
type SnapshotScheduleReconciler ¶
SnapshotScheduleReconciler reconciles a SnapshotSchedule object
func (*SnapshotScheduleReconciler) SetupWithManager ¶
func (r *SnapshotScheduleReconciler) SetupWithManager(mgr ctrl.Manager) error
type SnapshotVersionChecker ¶
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.