v1

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the snapscheduler v1 API group +kubebuilder:object:generate=true +groupName=snapscheduler.backube

Index

Constants

View Source
const (
	// ConditionReconciled is a Condition indicating whether the object is fully
	// reconciled.
	ConditionReconciled conditionsv1.ConditionType = "Reconciled"
	// ReconciledReasonError indicates there was an error while attempting to reconcile.
	ReconciledReasonError = "ReconcileError"
	// ReconciledReasonComplete indicates reconcile was successful
	ReconciledReasonComplete = "ReconcileComplete"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "snapscheduler.backube", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type SnapshotRetentionSpec

type SnapshotRetentionSpec struct {
	// Expires is the length of time (time.Duration) after which a given
	// Snapshot will be deleted.
	//+kubebuilder:validation:Pattern=^\d+(h|m|s)$
	//+optional
	Expires string `json:"expires,omitempty"`
	//+kubebuilder:validation:Minimum=1
	//+optional
	MaxCount *int32 `json:"maxCount,omitempty"`
}

SnapshotRetentionSpec defines how long snapshots should be kept.

func (*SnapshotRetentionSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotRetentionSpec.

func (*SnapshotRetentionSpec) DeepCopyInto

func (in *SnapshotRetentionSpec) DeepCopyInto(out *SnapshotRetentionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SnapshotSchedule

type SnapshotSchedule struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   SnapshotScheduleSpec   `json:"spec,omitempty"`
	Status SnapshotScheduleStatus `json:"status,omitempty"`
}

SnapshotSchedule is the Schema for the snapshotschedules API

func (*SnapshotSchedule) DeepCopy

func (in *SnapshotSchedule) DeepCopy() *SnapshotSchedule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotSchedule.

func (*SnapshotSchedule) DeepCopyInto

func (in *SnapshotSchedule) DeepCopyInto(out *SnapshotSchedule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SnapshotSchedule) DeepCopyObject

func (in *SnapshotSchedule) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SnapshotScheduleList

type SnapshotScheduleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []SnapshotSchedule `json:"items"`
}

SnapshotScheduleList contains a list of SnapshotSchedule

func (*SnapshotScheduleList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotScheduleList.

func (*SnapshotScheduleList) DeepCopyInto

func (in *SnapshotScheduleList) DeepCopyInto(out *SnapshotScheduleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SnapshotScheduleList) DeepCopyObject

func (in *SnapshotScheduleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SnapshotScheduleSpec

type SnapshotScheduleSpec struct {
	// ClaimSelector selects which PVCs will be snapshotted according to
	// this schedule.
	//+optional
	ClaimSelector metav1.LabelSelector `json:"claimSelector,omitempty"`
	// Retention determines how long this schedule's snapshots will be kept.
	//+optional
	Retention SnapshotRetentionSpec `json:"retention,omitempty"`
	// Schedule is a Cronspec specifying when snapshots should be taken. See
	// https://en.wikipedia.org/wiki/Cron for a description of the format.
	//+kubebuilder:validation:Pattern=`^((\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}|@(hourly|daily|weekly|monthly|yearly))$`
	Schedule string `json:"schedule,omitempty"`
	// Disabled determines whether this schedule is currently disabled.
	//+optional
	Disabled bool `json:"disabled,omitempty"`
	// SnapshotTemplate is a template description of the Snapshots to be created.
	SnapshotTemplate *SnapshotTemplateSpec `json:"snapshotTemplate,omitempty"`
}

SnapshotScheduleSpec defines the desired state of SnapshotSchedule

func (*SnapshotScheduleSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotScheduleSpec.

func (*SnapshotScheduleSpec) DeepCopyInto

func (in *SnapshotScheduleSpec) DeepCopyInto(out *SnapshotScheduleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SnapshotScheduleStatus

type SnapshotScheduleStatus struct {
	// Conditions is a list of conditions related to operator reconciliation.
	//+optional
	Conditions []conditionsv1.Condition `json:"conditions,omitempty"`
	// LastSnapshotTime is the time of the most recent set of snapshots
	// generated by this schedule.
	//+optional
	LastSnapshotTime *metav1.Time `json:"lastSnapshotTime,omitempty"`
	// NextSnapshotTime is the time when this schedule should create the
	// next set of snapshots.
	//+optional
	NextSnapshotTime *metav1.Time `json:"nextSnapshotTime,omitempty"`
}

SnapshotScheduleStatus defines the observed state of SnapshotSchedule

func (*SnapshotScheduleStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotScheduleStatus.

func (*SnapshotScheduleStatus) DeepCopyInto

func (in *SnapshotScheduleStatus) DeepCopyInto(out *SnapshotScheduleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SnapshotTemplateSpec

type SnapshotTemplateSpec struct {
	// Labels is a list of labels that should be added to each Snapshot
	// created by this schedule.
	//+optional
	Labels map[string]string `json:"labels,omitempty"`
	// SnapshotClassName is the name of the VSC to be used when creating
	// Snapshots.
	//+optional
	SnapshotClassName *string `json:"snapshotClassName,omitempty"`
}

SnapshotTemplateSpec defines the template for Snapshot objects

func (*SnapshotTemplateSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotTemplateSpec.

func (*SnapshotTemplateSpec) DeepCopyInto

func (in *SnapshotTemplateSpec) DeepCopyInto(out *SnapshotTemplateSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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