snapshotschedule

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
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

func Add

func Add(mgr manager.Manager) error

Add creates a new SnapshotSchedule Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

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

func (*ReconcileSnapshotSchedule) Reconcile

Reconcile reads that state of the cluster for a SnapshotSchedule object and makes changes based on the state read and what is in the SnapshotSchedule.Spec

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.

func (*SnapshotVersionChecker) Refresh added in v1.1.0

func (svc *SnapshotVersionChecker) Refresh(logger logr.Logger) error

Refresh queries the API server to determine the current valid versions.

func (*SnapshotVersionChecker) SetConfig added in v1.1.0

func (svc *SnapshotVersionChecker) SetConfig(c *rest.Config) error

SetConfig sets the configuration the version checker should use to communicate w/ the API server.

Jump to

Keyboard shortcuts

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