v1alpha1

package
Version: v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackupType   JobType = "backup"
	CheckType    JobType = "check"
	ArchiveType  JobType = "archive"
	RestoreType  JobType = "restore"
	PruneType    JobType = "prune"
	ScheduleType JobType = "schedule"

	// ConditionCompleted is given when the resource has completed its main function.
	ConditionCompleted ConditionType = "Completed"
	// ConditionReady is given when all preconditions are met.
	ConditionReady ConditionType = "Ready"
	// ConditionScrubbed is given when the resource has done its housework to clean up similar but outdated resources.
	ConditionScrubbed ConditionType = "Scrubbed"
	// ConditionProgressing is given when the resource is in the process of doing its main function.
	ConditionProgressing ConditionType = "Progressing"
	// ConditionPreBackupPodReady is True if Deployments for all Container definitions were created and are ready
	ConditionPreBackupPodReady ConditionType = "PreBackupPodReady"

	// ReasonReady indicates the condition is ready for work
	ReasonReady ConditionReason = "Ready"
	// ReasonStarted indicates the resource has started progressing
	ReasonStarted ConditionReason = "Started"
	// ReasonFinished indicates the resource has finished the work without specifying its success.
	ReasonFinished ConditionReason = "Finished"
	// ReasonSucceeded indicates the condition is succeeded
	ReasonSucceeded ConditionReason = "Succeeded"
	// ReasonFailed indicates there was a general failure not further categorized
	ReasonFailed ConditionReason = "Failed"
	// ReasonCreationFailed indicates that a dependent resource could not be created
	ReasonCreationFailed ConditionReason = "CreationFailed"
	// ReasonCreationFailed indicates that a dependent resource could not be created
	ReasonUpdateFailed ConditionReason = "UpdateFailed"
	// ReasonCreationFailed indicates that a dependent resource could not be deleted
	ReasonDeletionFailed ConditionReason = "DeletionFailed"
	// ReasonRetrievalFailed indicates that dependent resource(s) could not be retrieved for further processing
	ReasonRetrievalFailed ConditionReason = "RetrievalFailed"

	// ReasonNoPreBackupPodsFound is given when no PreBackupPods are found in the same namespace
	ReasonNoPreBackupPodsFound ConditionReason = "NoPreBackupPodsFound"
	// ReasonWaiting is given when PreBackupPods are waiting to be started
	ReasonWaiting ConditionReason = "Waiting"

	// LabelK8upType is the label key that identifies the job type
	LabelK8upType = "k8up.syn.tools/type"
	// LabelManagedBy identifies the tool being used to manage the operation of a resource
	LabelManagedBy = "app.kubernetes.io/managed-by"
)

The jobs types that k8up deals with

View Source
const (
	// ScheduleFinalizerName is a Finalizer added to resources that need cleanup cron schedules before deleting them.
	ScheduleFinalizerName = "k8up.syn.tools/schedule"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "backup.appuio.ch", Version: "v1alpha1"}

	// 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

func IsNil added in v1.0.2

func IsNil(v interface{}) bool

IsNil returns true if the given value is nil using reflect.

func MapToNamespacedName added in v1.0.3

func MapToNamespacedName(obj metav1.Object) types.NamespacedName

MapToNamespacedName translates the given object meta into NamespacedName object

Types

type Archive

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

	Spec   ArchiveSpec `json:"spec,omitempty"`
	Status Status      `json:"status,omitempty"`
}

Archive is the Schema for the archives API

func (*Archive) DeepCopy

func (in *Archive) DeepCopy() *Archive

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

func (*Archive) DeepCopyInto

func (in *Archive) DeepCopyInto(out *Archive)

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

func (*Archive) DeepCopyObject

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

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

func (*Archive) GetFailedJobsHistoryLimit added in v1.2.0

func (a *Archive) GetFailedJobsHistoryLimit() *int

GetFailedJobsHistoryLimit returns failed jobs history limit. Returns KeepJobs if unspecified.

func (*Archive) GetJobName added in v1.2.0

func (a *Archive) GetJobName() string

GetJobName returns the name of the underlying batch/v1 job.

func (*Archive) GetMetaObject

func (a *Archive) GetMetaObject() metav1.Object

func (*Archive) GetResources

func (a *Archive) GetResources() corev1.ResourceRequirements

GetResources returns the resource requirements

func (*Archive) GetRuntimeObject

func (a *Archive) GetRuntimeObject() runtime.Object

func (*Archive) GetStatus

func (a *Archive) GetStatus() Status

GetStatus retrieves the Status property

func (*Archive) GetSuccessfulJobsHistoryLimit added in v1.2.0

func (a *Archive) GetSuccessfulJobsHistoryLimit() *int

GetSuccessfulJobsHistoryLimit returns successful jobs history limit. Returns KeepJobs if unspecified.

func (*Archive) GetType

func (*Archive) GetType() JobType

func (*Archive) SetStatus

func (a *Archive) SetStatus(status Status)

SetStatus sets the Status property

type ArchiveList

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

ArchiveList contains a list of Archive

func (*ArchiveList) DeepCopy

func (in *ArchiveList) DeepCopy() *ArchiveList

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

func (*ArchiveList) DeepCopyInto

func (in *ArchiveList) DeepCopyInto(out *ArchiveList)

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

func (*ArchiveList) DeepCopyObject

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

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

func (*ArchiveList) GetJobObjects added in v1.2.0

func (a *ArchiveList) GetJobObjects() JobObjectList

GetJobObjects returns a sortable list of jobs

type ArchiveSchedule

type ArchiveSchedule struct {
	ArchiveSpec     `json:",inline"`
	*ScheduleCommon `json:",inline"`
}

ArchiveSchedule manages schedules for the archival service

func (*ArchiveSchedule) DeepCopy

func (in *ArchiveSchedule) DeepCopy() *ArchiveSchedule

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

func (*ArchiveSchedule) DeepCopyInto

func (in *ArchiveSchedule) DeepCopyInto(out *ArchiveSchedule)

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

func (*ArchiveSchedule) GetDeepCopy added in v1.0.2

func (in *ArchiveSchedule) GetDeepCopy() ScheduleSpecInterface

GetDeepCopy returns a deep copy

func (*ArchiveSchedule) GetObjectCreator added in v1.0.2

func (in *ArchiveSchedule) GetObjectCreator() ObjectCreator

GetObjectCreator returns the ObjectCreator instance

func (*ArchiveSchedule) GetRunnableSpec added in v1.0.2

func (in *ArchiveSchedule) GetRunnableSpec() *RunnableSpec

GetRunnableSpec returns a pointer to RunnableSpec

func (*ArchiveSchedule) GetSchedule added in v1.0.2

func (in *ArchiveSchedule) GetSchedule() ScheduleDefinition

GetSchedule returns the schedule definition

type ArchiveSpec

type ArchiveSpec struct {
	*RestoreSpec `json:",inline"`
}

ArchiveSpec defines the desired state of Archive.

func (ArchiveSpec) CreateObject

func (a ArchiveSpec) CreateObject(name, namespace string) runtime.Object

func (*ArchiveSpec) DeepCopy

func (in *ArchiveSpec) DeepCopy() *ArchiveSpec

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

func (*ArchiveSpec) DeepCopyInto

func (in *ArchiveSpec) DeepCopyInto(out *ArchiveSpec)

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

type AzureSpec

type AzureSpec struct {
	Container            string                    `json:"container,omitempty"`
	AccountNameSecretRef *corev1.SecretKeySelector `json:"accountNameSecretRef,omitempty"`
	AccountKeySecretRef  *corev1.SecretKeySelector `json:"accountKeySecretRef,omitempty"`
}

func (*AzureSpec) DeepCopy

func (in *AzureSpec) DeepCopy() *AzureSpec

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

func (*AzureSpec) DeepCopyInto

func (in *AzureSpec) DeepCopyInto(out *AzureSpec)

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

func (*AzureSpec) EnvVars

func (in *AzureSpec) EnvVars(vars map[string]*corev1.EnvVarSource) map[string]*corev1.EnvVarSource

EnvVars returns the env vars for this backend.

func (*AzureSpec) String

func (in *AzureSpec) String() string

String returns "azure:container:/"

type B2Spec

type B2Spec struct {
	Bucket              string                    `json:"bucket,omitempty"`
	Path                string                    `json:"path,omitempty"`
	AccountIDSecretRef  *corev1.SecretKeySelector `json:"accountIDSecretRef,omitempty"`
	AccountKeySecretRef *corev1.SecretKeySelector `json:"accountKeySecretRef,omitempty"`
}

func (*B2Spec) DeepCopy

func (in *B2Spec) DeepCopy() *B2Spec

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

func (*B2Spec) DeepCopyInto

func (in *B2Spec) DeepCopyInto(out *B2Spec)

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

func (*B2Spec) EnvVars

func (in *B2Spec) EnvVars(vars map[string]*corev1.EnvVarSource) map[string]*corev1.EnvVarSource

EnvVars returns the env vars for this backend.

func (*B2Spec) String

func (in *B2Spec) String() string

String returns "b2:bucket:path"

type Backend

type Backend struct {
	// RepoPasswordSecretRef references a secret key to look up the restic repository password
	RepoPasswordSecretRef *corev1.SecretKeySelector `json:"repoPasswordSecretRef,omitempty"`
	Local                 *LocalSpec                `json:"local,omitempty"`
	S3                    *S3Spec                   `json:"s3,omitempty"`
	GCS                   *GCSSpec                  `json:"gcs,omitempty"`
	Azure                 *AzureSpec                `json:"azure,omitempty"`
	Swift                 *SwiftSpec                `json:"swift,omitempty"`
	B2                    *B2Spec                   `json:"b2,omitempty"`
	Rest                  *RestServerSpec           `json:"rest,omitempty"`
}

Backend allows configuring several backend implementations. It is expected that users only configure one storage type.

func (*Backend) DeepCopy

func (in *Backend) DeepCopy() *Backend

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

func (*Backend) DeepCopyInto

func (in *Backend) DeepCopyInto(out *Backend)

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

func (*Backend) GetCredentialEnv

func (in *Backend) GetCredentialEnv() map[string]*corev1.EnvVarSource

GetCredentialEnv will return a map containing the credentials for the given backend.

func (*Backend) IsBackendEqualTo

func (in *Backend) IsBackendEqualTo(other *Backend) bool

IsBackendEqualTo returns true if the restic repository string is equal to the other's string. If other is nil, it returns false.

func (*Backend) String

func (in *Backend) String() string

String returns the string representation of the repository. If no repo is defined it'll return empty string.

type BackendInterface

type BackendInterface interface {
	EnvVars(vars map[string]*corev1.EnvVarSource) map[string]*corev1.EnvVarSource
	String() string
}

BackendInterface represents a Backend for internal use.

type Backup

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

	Spec   BackupSpec `json:"spec,omitempty"`
	Status Status     `json:"status,omitempty"`
}

Backup is the Schema for the backups API

func (*Backup) DeepCopy

func (in *Backup) DeepCopy() *Backup

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

func (*Backup) DeepCopyInto

func (in *Backup) DeepCopyInto(out *Backup)

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

func (*Backup) DeepCopyObject

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

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

func (*Backup) GetFailedJobsHistoryLimit added in v1.2.0

func (b *Backup) GetFailedJobsHistoryLimit() *int

GetFailedJobsHistoryLimit returns failed jobs history limit. Returns KeepJobs if unspecified.

func (*Backup) GetJobName added in v1.2.0

func (b *Backup) GetJobName() string

GetJobName returns the name of the underlying batch/v1 job.

func (*Backup) GetMetaObject

func (b *Backup) GetMetaObject() metav1.Object

func (*Backup) GetResources

func (b *Backup) GetResources() corev1.ResourceRequirements

GetResources returns the resource requirements

func (*Backup) GetRuntimeObject

func (b *Backup) GetRuntimeObject() runtime.Object

func (*Backup) GetStatus

func (b *Backup) GetStatus() Status

GetStatus retrieves the Status property

func (*Backup) GetSuccessfulJobsHistoryLimit added in v1.2.0

func (b *Backup) GetSuccessfulJobsHistoryLimit() *int

GetSuccessfulJobsHistoryLimit returns successful jobs history limit. Returns KeepJobs if unspecified.

func (*Backup) GetType

func (*Backup) GetType() JobType

func (*Backup) SetStatus

func (b *Backup) SetStatus(status Status)

SetStatus sets the Status property

type BackupList

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

BackupList contains a list of Backup

func (*BackupList) DeepCopy

func (in *BackupList) DeepCopy() *BackupList

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

func (*BackupList) DeepCopyInto

func (in *BackupList) DeepCopyInto(out *BackupList)

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

func (*BackupList) DeepCopyObject

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

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

func (*BackupList) GetJobObjects added in v1.2.0

func (b *BackupList) GetJobObjects() JobObjectList

GetJobObjects returns a sortable list of jobs

type BackupSchedule

type BackupSchedule struct {
	BackupSpec      `json:",inline"`
	*ScheduleCommon `json:",inline"`
}

BackupSchedule manages schedules for the backup service

func (*BackupSchedule) DeepCopy

func (in *BackupSchedule) DeepCopy() *BackupSchedule

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

func (*BackupSchedule) DeepCopyInto

func (in *BackupSchedule) DeepCopyInto(out *BackupSchedule)

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

func (*BackupSchedule) GetDeepCopy added in v1.0.2

func (in *BackupSchedule) GetDeepCopy() ScheduleSpecInterface

GetDeepCopy returns a deep copy

func (*BackupSchedule) GetObjectCreator added in v1.0.2

func (in *BackupSchedule) GetObjectCreator() ObjectCreator

GetObjectCreator returns the ObjectCreator instance

func (*BackupSchedule) GetRunnableSpec added in v1.0.2

func (in *BackupSchedule) GetRunnableSpec() *RunnableSpec

GetRunnableSpec returns a pointer to RunnableSpec

func (*BackupSchedule) GetSchedule added in v1.0.2

func (in *BackupSchedule) GetSchedule() ScheduleDefinition

GetSchedule returns the schedule definition

type BackupSpec

type BackupSpec struct {
	RunnableSpec `json:",inline"`

	// KeepJobs amount of jobs to keep for later analysis.
	//
	// Deprecated: Use FailedJobsHistoryLimit and SuccessfulJobsHistoryLimit respectively.
	// +optional
	KeepJobs *int `json:"keepJobs,omitempty"`
	// FailedJobsHistoryLimit amount of failed jobs to keep for later analysis.
	// KeepJobs is used property is not specified.
	// +optional
	FailedJobsHistoryLimit *int `json:"failedJobsHistoryLimit,omitempty"`
	// SuccessfulJobsHistoryLimit amount of successful jobs to keep for later analysis.
	// KeepJobs is used property is not specified.
	// +optional
	SuccessfulJobsHistoryLimit *int `json:"successfulJobsHistoryLimit,omitempty"`

	// PromURL sets a prometheus push URL where the backup container send metrics to
	// +optional
	PromURL string `json:"promURL,omitempty"`

	// StatsURL sets an arbitrary URL where the wrestic container posts metrics and
	// information about the snapshots to. This is in addition to the prometheus
	// pushgateway.
	StatsURL string `json:"statsURL,omitempty"`

	// Tags is a list of arbitrary tags that get added to the backup via Restic's tagging system
	Tags []string `json:"tags,omitempty"`
}

BackupSpec defines a single backup. It must contain all inforomation to connect to the backup repository when applied. If used with defaults or schedules the operator will ensure that the defaults are applied before creating the object on the API.

func (BackupSpec) CreateObject

func (b BackupSpec) CreateObject(name, namespace string) runtime.Object

func (*BackupSpec) DeepCopy

func (in *BackupSpec) DeepCopy() *BackupSpec

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

func (*BackupSpec) DeepCopyInto

func (in *BackupSpec) DeepCopyInto(out *BackupSpec)

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

type BackupTemplate

type BackupTemplate struct {
	Tags    *[]string `json:"tags,omitempty"`
	Backend Backend   `json:"backend,omitempty"`
	Env     Env       `json:"env,omitempty"`
}

func (*BackupTemplate) DeepCopy

func (in *BackupTemplate) DeepCopy() *BackupTemplate

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

func (*BackupTemplate) DeepCopyInto

func (in *BackupTemplate) DeepCopyInto(out *BackupTemplate)

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

type Check

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

	Spec   CheckSpec `json:"spec,omitempty"`
	Status Status    `json:"status,omitempty"`
}

Check is the Schema for the checks API

func (*Check) DeepCopy

func (in *Check) DeepCopy() *Check

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

func (*Check) DeepCopyInto

func (in *Check) DeepCopyInto(out *Check)

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

func (*Check) DeepCopyObject

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

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

func (*Check) GetFailedJobsHistoryLimit added in v1.2.0

func (c *Check) GetFailedJobsHistoryLimit() *int

GetFailedJobsHistoryLimit returns failed jobs history limit. Returns KeepJobs if unspecified.

func (*Check) GetJobName added in v1.2.0

func (c *Check) GetJobName() string

GetJobName returns the name of the underlying batch/v1 job.

func (*Check) GetMetaObject

func (c *Check) GetMetaObject() metav1.Object

func (*Check) GetResources

func (c *Check) GetResources() corev1.ResourceRequirements

GetResources returns the resource requirements

func (*Check) GetRuntimeObject

func (c *Check) GetRuntimeObject() runtime.Object

func (*Check) GetStatus

func (c *Check) GetStatus() Status

GetStatus retrieves the Status property

func (*Check) GetSuccessfulJobsHistoryLimit added in v1.2.0

func (c *Check) GetSuccessfulJobsHistoryLimit() *int

GetSuccessfulJobsHistoryLimit returns successful jobs history limit. Returns KeepJobs if unspecified.

func (*Check) GetType

func (c *Check) GetType() JobType

func (*Check) SetStatus

func (c *Check) SetStatus(status Status)

SetStatus sets the Status property

type CheckList

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

CheckList contains a list of Check

func (*CheckList) DeepCopy

func (in *CheckList) DeepCopy() *CheckList

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

func (*CheckList) DeepCopyInto

func (in *CheckList) DeepCopyInto(out *CheckList)

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

func (*CheckList) DeepCopyObject

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

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

func (*CheckList) GetJobObjects added in v1.2.0

func (c *CheckList) GetJobObjects() JobObjectList

GetJobObjects returns a sortable list of jobs

type CheckSchedule

type CheckSchedule struct {
	CheckSpec       `json:",inline"`
	*ScheduleCommon `json:",inline"`
}

CheckSchedule manages the schedules for the checks

func (*CheckSchedule) DeepCopy

func (in *CheckSchedule) DeepCopy() *CheckSchedule

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

func (*CheckSchedule) DeepCopyInto

func (in *CheckSchedule) DeepCopyInto(out *CheckSchedule)

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

func (*CheckSchedule) GetDeepCopy added in v1.0.2

func (in *CheckSchedule) GetDeepCopy() ScheduleSpecInterface

GetDeepCopy returns a deep copy

func (*CheckSchedule) GetObjectCreator added in v1.0.2

func (in *CheckSchedule) GetObjectCreator() ObjectCreator

GetObjectCreator returns the ObjectCreator instance

func (*CheckSchedule) GetRunnableSpec added in v1.0.2

func (in *CheckSchedule) GetRunnableSpec() *RunnableSpec

GetRunnableSpec returns a pointer to RunnableSpec

func (*CheckSchedule) GetSchedule added in v1.0.2

func (in *CheckSchedule) GetSchedule() ScheduleDefinition

GetSchedule returns the schedule definition

type CheckSpec

type CheckSpec struct {
	RunnableSpec `json:",inline"`

	// PromURL sets a prometheus push URL where the backup container send metrics to
	// +optional
	PromURL string `json:"promURL,omitempty"`

	// KeepJobs amount of jobs to keep for later analysis.
	//
	// Deprecated: Use FailedJobsHistoryLimit and SuccessfulJobsHistoryLimit respectively.
	// +optional
	KeepJobs *int `json:"keepJobs,omitempty"`
	// FailedJobsHistoryLimit amount of failed jobs to keep for later analysis.
	// KeepJobs is used property is not specified.
	// +optional
	FailedJobsHistoryLimit *int `json:"failedJobsHistoryLimit,omitempty"`
	// SuccessfulJobsHistoryLimit amount of successful jobs to keep for later analysis.
	// KeepJobs is used property is not specified.
	// +optional
	SuccessfulJobsHistoryLimit *int `json:"successfulJobsHistoryLimit,omitempty"`
}

CheckSpec defines the desired state of Check. It needs to contain the repository information.

func (CheckSpec) CreateObject

func (c CheckSpec) CreateObject(name, namespace string) runtime.Object

func (*CheckSpec) DeepCopy

func (in *CheckSpec) DeepCopy() *CheckSpec

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

func (*CheckSpec) DeepCopyInto

func (in *CheckSpec) DeepCopyInto(out *CheckSpec)

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

type ConditionReason

type ConditionReason string

ConditionReason is a static/programmatic representation of the cause of a status condition.

func (ConditionReason) String

func (r ConditionReason) String() string

String casts the value to string. "r.String()" and "string(r)" are equivalent.

type ConditionType

type ConditionType string

ConditionType defines what condition type this is.

func (ConditionType) String

func (c ConditionType) String() string

String casts the value to string. "c.String()" and "string(c)" are equivalent.

type EffectiveSchedule

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

	Spec EffectiveScheduleSpec `json:"spec,omitempty"`
}

EffectiveSchedule is the Schema to persist schedules generated from Randomized schedules.

func (*EffectiveSchedule) DeepCopy

func (in *EffectiveSchedule) DeepCopy() *EffectiveSchedule

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

func (*EffectiveSchedule) DeepCopyInto

func (in *EffectiveSchedule) DeepCopyInto(out *EffectiveSchedule)

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

func (*EffectiveSchedule) DeepCopyObject

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

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

type EffectiveScheduleList

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

EffectiveScheduleList contains a list of EffectiveSchedule

func (*EffectiveScheduleList) DeepCopy

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

func (*EffectiveScheduleList) DeepCopyInto

func (in *EffectiveScheduleList) DeepCopyInto(out *EffectiveScheduleList)

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

func (*EffectiveScheduleList) DeepCopyObject

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

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

type EffectiveScheduleSpec

type EffectiveScheduleSpec struct {
	// GeneratedSchedule is the effective schedule that is added to Cron
	GeneratedSchedule ScheduleDefinition `json:"generatedSchedule,omitempty"`
	// OriginalSchedule is the original user-defined schedule definition in the Schedule object.
	OriginalSchedule ScheduleDefinition `json:"originalSchedule,omitempty"`
	// JobType defines to which job type this schedule applies
	JobType JobType `json:"jobType,omitempty"`
	// ScheduleRefs holds a list of schedules for which the generated schedule applies to.
	// The list may omit entries that aren't generated from smart schedules.
	ScheduleRefs []ScheduleRef `json:"scheduleRefs,omitempty"`
}

EffectiveScheduleSpec defines the desired state of EffectiveSchedule

func (*EffectiveScheduleSpec) AddScheduleRef

func (in *EffectiveScheduleSpec) AddScheduleRef(newRef ScheduleRef)

AddScheduleRef adds the given newRef to the existing ScheduleRefs if not already existing.

func (*EffectiveScheduleSpec) DeepCopy

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

func (*EffectiveScheduleSpec) DeepCopyInto

func (in *EffectiveScheduleSpec) DeepCopyInto(out *EffectiveScheduleSpec)

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

type Env

type Env struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value,omitempty"`
}

func (*Env) DeepCopy

func (in *Env) DeepCopy() *Env

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

func (*Env) DeepCopyInto

func (in *Env) DeepCopyInto(out *Env)

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

type FolderRestore

type FolderRestore struct {
	*corev1.PersistentVolumeClaimVolumeSource `json:",inline"`
}

func (*FolderRestore) DeepCopy

func (in *FolderRestore) DeepCopy() *FolderRestore

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

func (*FolderRestore) DeepCopyInto

func (in *FolderRestore) DeepCopyInto(out *FolderRestore)

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

type GCSSpec

type GCSSpec struct {
	Bucket               string                    `json:"bucket,omitempty"`
	ProjectIDSecretRef   *corev1.SecretKeySelector `json:"projectIDSecretRef,omitempty"`
	AccessTokenSecretRef *corev1.SecretKeySelector `json:"accessTokenSecretRef,omitempty"`
}

func (*GCSSpec) DeepCopy

func (in *GCSSpec) DeepCopy() *GCSSpec

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

func (*GCSSpec) DeepCopyInto

func (in *GCSSpec) DeepCopyInto(out *GCSSpec)

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

func (*GCSSpec) EnvVars

func (in *GCSSpec) EnvVars(vars map[string]*corev1.EnvVarSource) map[string]*corev1.EnvVarSource

EnvVars returns the env vars for this backend.

func (*GCSSpec) String

func (in *GCSSpec) String() string

String returns "gs:bucket:/"

type JobObject added in v1.2.0

type JobObject interface {
	GetMetaObject() metav1.Object
	GetRuntimeObject() runtime.Object
	GetStatus() Status
	SetStatus(s Status)
	GetType() JobType
	// GetJobName returns the name of the underlying batch/v1 job.
	GetJobName() string
	GetResources() corev1.ResourceRequirements
}

JobObject is an interface that must be implemented by all CRDs that implement a job.

type JobObjectList added in v1.2.0

type JobObjectList []JobObject

JobObjectList is a sortable list of job objects

func (JobObjectList) Len added in v1.2.0

func (jo JobObjectList) Len() int

func (JobObjectList) Less added in v1.2.0

func (jo JobObjectList) Less(i, j int) bool

func (JobObjectList) Swap added in v1.2.0

func (jo JobObjectList) Swap(i, j int)

type JobType

type JobType string

JobType defines what job type this is.

func (JobType) String

func (j JobType) String() string

String casts the value to string. "aJobType.String()" and "string(aJobType)" are equivalent.

type LocalSpec

type LocalSpec struct {
	MountPath string `json:"mountPath,omitempty"`
}

func (*LocalSpec) DeepCopy

func (in *LocalSpec) DeepCopy() *LocalSpec

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

func (*LocalSpec) DeepCopyInto

func (in *LocalSpec) DeepCopyInto(out *LocalSpec)

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

func (*LocalSpec) EnvVars

func (in *LocalSpec) EnvVars(vars map[string]*corev1.EnvVarSource) map[string]*corev1.EnvVarSource

EnvVars returns the env vars for this backend.

func (*LocalSpec) String

func (in *LocalSpec) String() string

String returns the mountpath.

type ObjectCreator added in v1.0.2

type ObjectCreator interface {
	CreateObject(name, namespace string) runtime.Object
}

ObjectCreator defines an interface that each schedulable Job must implement. The simplest implementation is that the concrete object just returns itself.

type Pod

type Pod struct {
	corev1.PodTemplateSpec `json:",inline"`
}

Pod is a dummy struct to fix some code generation issues.

func (*Pod) DeepCopy

func (in *Pod) DeepCopy() *Pod

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

func (*Pod) DeepCopyInto

func (in *Pod) DeepCopyInto(out *Pod)

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

type PreBackupPod

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

	Spec PreBackupPodSpec `json:"spec,omitempty"`
}

PreBackupPod is the Schema for the prebackuppods API

func (*PreBackupPod) DeepCopy

func (in *PreBackupPod) DeepCopy() *PreBackupPod

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

func (*PreBackupPod) DeepCopyInto

func (in *PreBackupPod) DeepCopyInto(out *PreBackupPod)

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

func (*PreBackupPod) DeepCopyObject

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

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

type PreBackupPodList

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

PreBackupPodList contains a list of PreBackupPod

func (*PreBackupPodList) DeepCopy

func (in *PreBackupPodList) DeepCopy() *PreBackupPodList

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

func (*PreBackupPodList) DeepCopyInto

func (in *PreBackupPodList) DeepCopyInto(out *PreBackupPodList)

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

func (*PreBackupPodList) DeepCopyObject

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

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

type PreBackupPodSpec

type PreBackupPodSpec struct {
	// BackupCommand will be added to the backupcommand annotation on the pod.
	BackupCommand string `json:"backupCommand,omitempty"`
	FileExtension string `json:"fileExtension,omitempty"`
	// +kubebuilder:validation:Required
	Pod *Pod `json:"pod,omitempty"`
}

PreBackupPodSpec define pods that will be launched during the backup. After the backup has finished (successfully or not), they should be removed again automatically by the operator.

func (*PreBackupPodSpec) DeepCopy

func (in *PreBackupPodSpec) DeepCopy() *PreBackupPodSpec

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

func (*PreBackupPodSpec) DeepCopyInto

func (in *PreBackupPodSpec) DeepCopyInto(out *PreBackupPodSpec)

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

type Prune

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

	Spec   PruneSpec `json:"spec,omitempty"`
	Status Status    `json:"status,omitempty"`
}

Prune is the Schema for the prunes API

func (*Prune) DeepCopy

func (in *Prune) DeepCopy() *Prune

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

func (*Prune) DeepCopyInto

func (in *Prune) DeepCopyInto(out *Prune)

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

func (*Prune) DeepCopyObject

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

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

func (*Prune) GetFailedJobsHistoryLimit added in v1.2.0

func (p *Prune) GetFailedJobsHistoryLimit() *int

GetFailedJobsHistoryLimit returns failed jobs history limit. Returns KeepJobs if unspecified.

func (*Prune) GetJobName added in v1.2.0

func (p *Prune) GetJobName() string

GetJobName returns the name of the underlying batch/v1 job.

func (*Prune) GetMetaObject

func (p *Prune) GetMetaObject() metav1.Object

func (*Prune) GetResources

func (p *Prune) GetResources() corev1.ResourceRequirements

GetResources returns the resource requirements

func (*Prune) GetRuntimeObject

func (p *Prune) GetRuntimeObject() runtime.Object

func (*Prune) GetStatus

func (p *Prune) GetStatus() Status

GetStatus retrieves the Status property

func (*Prune) GetSuccessfulJobsHistoryLimit added in v1.2.0

func (p *Prune) GetSuccessfulJobsHistoryLimit() *int

GetSuccessfulJobsHistoryLimit returns successful jobs history limit. Returns KeepJobs if unspecified.

func (*Prune) GetType

func (p *Prune) GetType() JobType

func (*Prune) SetStatus

func (p *Prune) SetStatus(status Status)

SetStatus sets the Status property

type PruneList

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

PruneList contains a list of Prune

func (*PruneList) DeepCopy

func (in *PruneList) DeepCopy() *PruneList

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

func (*PruneList) DeepCopyInto

func (in *PruneList) DeepCopyInto(out *PruneList)

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

func (*PruneList) DeepCopyObject

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

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

func (*PruneList) GetJobObjects added in v1.2.0

func (p *PruneList) GetJobObjects() JobObjectList

GetJobObjects returns a sortable list of jobs

type PruneSchedule

type PruneSchedule struct {
	PruneSpec       `json:",inline"`
	*ScheduleCommon `json:",inline"`
}

func (*PruneSchedule) DeepCopy

func (in *PruneSchedule) DeepCopy() *PruneSchedule

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

func (*PruneSchedule) DeepCopyInto

func (in *PruneSchedule) DeepCopyInto(out *PruneSchedule)

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

func (*PruneSchedule) GetDeepCopy added in v1.0.2

func (in *PruneSchedule) GetDeepCopy() ScheduleSpecInterface

GetDeepCopy returns a deep copy

func (*PruneSchedule) GetObjectCreator added in v1.0.2

func (in *PruneSchedule) GetObjectCreator() ObjectCreator

GetObjectCreator returns the ObjectCreator instance

func (*PruneSchedule) GetRunnableSpec added in v1.0.2

func (in *PruneSchedule) GetRunnableSpec() *RunnableSpec

GetRunnableSpec returns a pointer to RunnableSpec

func (*PruneSchedule) GetSchedule added in v1.0.2

func (in *PruneSchedule) GetSchedule() ScheduleDefinition

GetSchedule returns the schedule definition

type PruneSpec

type PruneSpec struct {
	RunnableSpec `json:",inline"`

	// Retention sets how many backups should be kept after a forget and prune
	Retention RetentionPolicy `json:"retention,omitempty"`
	// KeepJobs amount of jobs to keep for later analysis.
	//
	// Deprecated: Use FailedJobsHistoryLimit and SuccessfulJobsHistoryLimit respectively.
	// +optional
	KeepJobs *int `json:"keepJobs,omitempty"`
	// FailedJobsHistoryLimit amount of failed jobs to keep for later analysis.
	// KeepJobs is used property is not specified.
	// +optional
	FailedJobsHistoryLimit *int `json:"failedJobsHistoryLimit,omitempty"`
	// SuccessfulJobsHistoryLimit amount of successful jobs to keep for later analysis.
	// KeepJobs is used property is not specified.
	// +optional
	SuccessfulJobsHistoryLimit *int `json:"successfulJobsHistoryLimit,omitempty"`
}

PruneSpec needs to contain the repository information as well as the desired retention policies.

func (PruneSpec) CreateObject

func (p PruneSpec) CreateObject(name, namespace string) runtime.Object

func (*PruneSpec) DeepCopy

func (in *PruneSpec) DeepCopy() *PruneSpec

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

func (*PruneSpec) DeepCopyInto

func (in *PruneSpec) DeepCopyInto(out *PruneSpec)

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

type RestServerSpec

type RestServerSpec struct {
	URL               string                    `json:"url,omitempty"`
	UserSecretRef     *corev1.SecretKeySelector `json:"userSecretRef,omitempty"`
	PasswordSecretReg *corev1.SecretKeySelector `json:"passwordSecretReg,omitempty"`
}

func (*RestServerSpec) DeepCopy

func (in *RestServerSpec) DeepCopy() *RestServerSpec

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

func (*RestServerSpec) DeepCopyInto

func (in *RestServerSpec) DeepCopyInto(out *RestServerSpec)

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

func (*RestServerSpec) EnvVars

func (in *RestServerSpec) EnvVars(vars map[string]*corev1.EnvVarSource) map[string]*corev1.EnvVarSource

EnvVars returns the env vars for this backend.

func (*RestServerSpec) String

func (in *RestServerSpec) String() string

String returns "rest:URL"

type Restore

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

	Spec   RestoreSpec `json:"spec,omitempty"`
	Status Status      `json:"status,omitempty"`
}

Restore is the Schema for the restores API

func (*Restore) DeepCopy

func (in *Restore) DeepCopy() *Restore

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

func (*Restore) DeepCopyInto

func (in *Restore) DeepCopyInto(out *Restore)

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

func (*Restore) DeepCopyObject

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

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

func (*Restore) GetFailedJobsHistoryLimit added in v1.2.0

func (r *Restore) GetFailedJobsHistoryLimit() *int

GetFailedJobsHistoryLimit returns failed jobs history limit. Returns KeepJobs if unspecified.

func (*Restore) GetJobName added in v1.2.0

func (r *Restore) GetJobName() string

GetJobName returns the name of the underlying batch/v1 job.

func (*Restore) GetMetaObject

func (r *Restore) GetMetaObject() metav1.Object

func (*Restore) GetResources

func (r *Restore) GetResources() corev1.ResourceRequirements

GetResources returns the resource requirements

func (*Restore) GetRuntimeObject

func (r *Restore) GetRuntimeObject() runtime.Object

func (*Restore) GetStatus

func (r *Restore) GetStatus() Status

GetStatus retrieves the Status property

func (*Restore) GetSuccessfulJobsHistoryLimit added in v1.2.0

func (r *Restore) GetSuccessfulJobsHistoryLimit() *int

GetSuccessfulJobsHistoryLimit returns successful jobs history limit. Returns KeepJobs if unspecified.

func (*Restore) GetType

func (r *Restore) GetType() JobType

func (*Restore) SetStatus

func (r *Restore) SetStatus(status Status)

SetStatus sets the Status property

type RestoreList

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

RestoreList contains a list of Restore

func (*RestoreList) DeepCopy

func (in *RestoreList) DeepCopy() *RestoreList

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

func (*RestoreList) DeepCopyInto

func (in *RestoreList) DeepCopyInto(out *RestoreList)

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

func (*RestoreList) DeepCopyObject

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

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

func (*RestoreList) GetJobObjects added in v1.2.0

func (r *RestoreList) GetJobObjects() JobObjectList

GetJobObjects returns a sortable list of jobs

type RestoreMethod

type RestoreMethod struct {
	S3     *S3Spec        `json:"s3,omitempty"`
	Folder *FolderRestore `json:"folder,omitempty"`
}

RestoreMethod contains how and where the restore should happen all the settings are mutual exclusive.

func (*RestoreMethod) DeepCopy

func (in *RestoreMethod) DeepCopy() *RestoreMethod

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

func (*RestoreMethod) DeepCopyInto

func (in *RestoreMethod) DeepCopyInto(out *RestoreMethod)

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

type RestoreSchedule

type RestoreSchedule struct {
	RestoreSpec     `json:",inline"`
	*ScheduleCommon `json:",inline"`
}

RestoreSchedule manages schedules for the restore service

func (*RestoreSchedule) DeepCopy

func (in *RestoreSchedule) DeepCopy() *RestoreSchedule

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

func (*RestoreSchedule) DeepCopyInto

func (in *RestoreSchedule) DeepCopyInto(out *RestoreSchedule)

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

func (*RestoreSchedule) GetDeepCopy added in v1.0.2

func (in *RestoreSchedule) GetDeepCopy() ScheduleSpecInterface

GetDeepCopy returns a deep copy

func (*RestoreSchedule) GetObjectCreator added in v1.0.2

func (in *RestoreSchedule) GetObjectCreator() ObjectCreator

GetObjectCreator returns the ObjectCreator instance

func (*RestoreSchedule) GetRunnableSpec added in v1.0.2

func (in *RestoreSchedule) GetRunnableSpec() *RunnableSpec

GetRunnableSpec returns a pointer to RunnableSpec

func (*RestoreSchedule) GetSchedule added in v1.0.2

func (in *RestoreSchedule) GetSchedule() ScheduleDefinition

GetSchedule returns the schedule definition

type RestoreSpec

type RestoreSpec struct {
	RunnableSpec `json:",inline"`

	RestoreMethod *RestoreMethod `json:"restoreMethod,omitempty"`
	RestoreFilter string         `json:"restoreFilter,omitempty"`
	Snapshot      string         `json:"snapshot,omitempty"`
	// KeepJobs amount of jobs to keep for later analysis.
	//
	// Deprecated: Use FailedJobsHistoryLimit and SuccessfulJobsHistoryLimit respectively.
	// +optional
	KeepJobs *int `json:"keepJobs,omitempty"`
	// FailedJobsHistoryLimit amount of failed jobs to keep for later analysis.
	// KeepJobs is used property is not specified.
	// +optional
	FailedJobsHistoryLimit *int `json:"failedJobsHistoryLimit,omitempty"`
	// SuccessfulJobsHistoryLimit amount of successful jobs to keep for later analysis.
	// KeepJobs is used property is not specified.
	// +optional
	SuccessfulJobsHistoryLimit *int `json:"successfulJobsHistoryLimit,omitempty"`
	// Tags is a list of arbitrary tags that get added to the backup via Restic's tagging system
	Tags []string `json:"tags,omitempty"`
}

RestoreSpec can either contain an S3 restore point or a local one. For the local one you need to define an existing PVC.

func (RestoreSpec) CreateObject

func (r RestoreSpec) CreateObject(name, namespace string) runtime.Object

func (*RestoreSpec) DeepCopy

func (in *RestoreSpec) DeepCopy() *RestoreSpec

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

func (*RestoreSpec) DeepCopyInto

func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec)

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

type RetentionPolicy

type RetentionPolicy struct {
	KeepLast    int      `json:"keepLast,omitempty"`
	KeepHourly  int      `json:"keepHourly,omitempty"`
	KeepDaily   int      `json:"keepDaily,omitempty"`
	KeepWeekly  int      `json:"keepWeekly,omitempty"`
	KeepMonthly int      `json:"keepMonthly,omitempty"`
	KeepYearly  int      `json:"keepYearly,omitempty"`
	KeepTags    []string `json:"keepTags,omitempty"`
	// Tags is a filter on what tags the policy should be applied
	// DO NOT CONFUSE THIS WITH KeepTags OR YOU'LL have a bad time
	Tags []string `json:"tags,omitempty"`
	// Hostnames is a filter on what hostnames the policy should be applied
	Hostnames []string `json:"hostnames,omitempty"`
}

func (*RetentionPolicy) DeepCopy

func (in *RetentionPolicy) DeepCopy() *RetentionPolicy

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

func (*RetentionPolicy) DeepCopyInto

func (in *RetentionPolicy) DeepCopyInto(out *RetentionPolicy)

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

type RunnableSpec

type RunnableSpec struct {
	// Backend contains the restic repo where the job should backup to.
	Backend *Backend `json:"backend,omitempty"`

	// Resources describes the compute resource requirements (cpu, memory, etc.)
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
}

RunnableSpec defines the fields that are necessary on the specs of all actions that are translated to k8s jobs eventually.

func (*RunnableSpec) DeepCopy

func (in *RunnableSpec) DeepCopy() *RunnableSpec

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

func (*RunnableSpec) DeepCopyInto

func (in *RunnableSpec) DeepCopyInto(out *RunnableSpec)

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

type S3Spec

type S3Spec struct {
	Endpoint                 string                    `json:"endpoint,omitempty"`
	Bucket                   string                    `json:"bucket,omitempty"`
	AccessKeyIDSecretRef     *corev1.SecretKeySelector `json:"accessKeyIDSecretRef,omitempty"`
	SecretAccessKeySecretRef *corev1.SecretKeySelector `json:"secretAccessKeySecretRef,omitempty"`
}

func (*S3Spec) DeepCopy

func (in *S3Spec) DeepCopy() *S3Spec

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

func (*S3Spec) DeepCopyInto

func (in *S3Spec) DeepCopyInto(out *S3Spec)

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

func (*S3Spec) EnvVars

func (in *S3Spec) EnvVars(vars map[string]*corev1.EnvVarSource) map[string]*corev1.EnvVarSource

EnvVars returns the env vars for this backend.

func (*S3Spec) RestoreEnvVars

func (in *S3Spec) RestoreEnvVars() map[string]*corev1.EnvVar

RestoreEnvVars returns the env vars for this backend when using Restore jobs.

func (*S3Spec) String

func (in *S3Spec) String() string

String returns "s3:endpoint/bucket". If endpoint or bucket are empty, it uses their global setting accordingly.

type Schedule

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

	Spec   ScheduleSpec   `json:"spec,omitempty"`
	Status ScheduleStatus `json:"status,omitempty"`
}

Schedule is the Schema for the schedules API

func (*Schedule) DeepCopy

func (in *Schedule) DeepCopy() *Schedule

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

func (*Schedule) DeepCopyInto

func (in *Schedule) DeepCopyInto(out *Schedule)

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

func (*Schedule) DeepCopyObject

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

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

func (*Schedule) GetFailedJobsHistoryLimit added in v1.2.0

func (s *Schedule) GetFailedJobsHistoryLimit() *int

GetFailedJobsHistoryLimit returns failed jobs history limit. Returns KeepJobs if unspecified.

func (*Schedule) GetJobName added in v1.2.0

func (s *Schedule) GetJobName() string

GetJobName implements the JobObject interface.

func (*Schedule) GetMetaObject

func (s *Schedule) GetMetaObject() metav1.Object

func (*Schedule) GetResources

func (s *Schedule) GetResources() corev1.ResourceRequirements

func (*Schedule) GetRuntimeObject

func (s *Schedule) GetRuntimeObject() runtime.Object

func (*Schedule) GetStatus

func (s *Schedule) GetStatus() Status

GetStatus retrieves the Status property

func (*Schedule) GetSuccessfulJobsHistoryLimit added in v1.2.0

func (s *Schedule) GetSuccessfulJobsHistoryLimit() *int

GetSuccessfulJobsHistoryLimit returns successful jobs history limit. Returns KeepJobs if unspecified.

func (*Schedule) GetType

func (*Schedule) GetType() JobType

func (*Schedule) IsReferencedBy

func (s *Schedule) IsReferencedBy(ref ScheduleRef) bool

IsReferencedBy returns true if the given ref matches the schedule's name and namespace.

func (*Schedule) SetStatus

func (s *Schedule) SetStatus(status Status)

SetStatus sets the Status.Conditions property

type ScheduleCommon

type ScheduleCommon struct {
	Schedule              ScheduleDefinition `json:"schedule,omitempty"`
	ConcurrentRunsAllowed bool               `json:"concurrentRunsAllowed,omitempty"`
}

ScheduleCommon contains fields every schedule needs

func (*ScheduleCommon) DeepCopy

func (in *ScheduleCommon) DeepCopy() *ScheduleCommon

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

func (*ScheduleCommon) DeepCopyInto

func (in *ScheduleCommon) DeepCopyInto(out *ScheduleCommon)

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

type ScheduleDefinition

type ScheduleDefinition string

ScheduleDefinition is the actual cron-type expression that defines the interval of the actions.

func (ScheduleDefinition) IsNonStandard

func (s ScheduleDefinition) IsNonStandard() bool

IsNonStandard returns true if the value begins with "@", indicating a special definition. Two examples are '@daily' and '@daily-random'.

func (ScheduleDefinition) IsRandom

func (s ScheduleDefinition) IsRandom() bool

IsRandom is true if the value is a special definition (as indicated by IsNonStandard) and if it ends with '-random'. Two examples are '@daily-random' and '@weekly-random'.

func (ScheduleDefinition) String

func (s ScheduleDefinition) String() string

String casts the value to string. "aScheduleDefinition.String()" and "string(aScheduleDefinition)" are equivalent.

type ScheduleList

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

ScheduleList contains a list of Schedule

func (*ScheduleList) DeepCopy

func (in *ScheduleList) DeepCopy() *ScheduleList

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

func (*ScheduleList) DeepCopyInto

func (in *ScheduleList) DeepCopyInto(out *ScheduleList)

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

func (*ScheduleList) DeepCopyObject

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

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

type ScheduleRef

type ScheduleRef struct {
	Name      string `json:"name,omitempty"`
	Namespace string `json:"namespace,omitempty"`
}

ScheduleRef represents a reference to a Schedule resource

func (*ScheduleRef) DeepCopy

func (in *ScheduleRef) DeepCopy() *ScheduleRef

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

func (*ScheduleRef) DeepCopyInto

func (in *ScheduleRef) DeepCopyInto(out *ScheduleRef)

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

type ScheduleSpec

type ScheduleSpec struct {
	Restore *RestoreSchedule `json:"restore,omitempty"`
	Backup  *BackupSchedule  `json:"backup,omitempty"`
	Archive *ArchiveSchedule `json:"archive,omitempty"`
	Check   *CheckSchedule   `json:"check,omitempty"`
	Prune   *PruneSchedule   `json:"prune,omitempty"`
	Backend *Backend         `json:"backend,omitempty"`

	// KeepJobs amount of jobs to keep for later analysis.
	//
	// Deprecated: Use FailedJobsHistoryLimit and SuccessfulJobsHistoryLimit respectively.
	// +optional
	KeepJobs *int `json:"keepJobs,omitempty"`
	// FailedJobsHistoryLimit amount of failed jobs to keep for later analysis.
	// KeepJobs is used property is not specified.
	// +optional
	FailedJobsHistoryLimit *int `json:"failedJobsHistoryLimit,omitempty"`
	// SuccessfulJobsHistoryLimit amount of successful jobs to keep for later analysis.
	// KeepJobs is used property is not specified.
	// +optional
	SuccessfulJobsHistoryLimit *int `json:"successfulJobsHistoryLimit,omitempty"`

	// ResourceRequirementsTemplate describes the compute resource requirements (cpu, memory, etc.)
	ResourceRequirementsTemplate corev1.ResourceRequirements `json:"resourceRequirementsTemplate,omitempty"`
}

ScheduleSpec defines the schedules for the various job types.

func (*ScheduleSpec) DeepCopy

func (in *ScheduleSpec) DeepCopy() *ScheduleSpec

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

func (*ScheduleSpec) DeepCopyInto

func (in *ScheduleSpec) DeepCopyInto(out *ScheduleSpec)

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

type ScheduleSpecInterface added in v1.0.2

type ScheduleSpecInterface interface {
	GetDeepCopy() ScheduleSpecInterface
	GetRunnableSpec() *RunnableSpec
	GetSchedule() ScheduleDefinition
	GetObjectCreator() ObjectCreator
}

ScheduleSpecInterface represents a Job for internal use.

type ScheduleStatus

type ScheduleStatus struct {
	// Conditions provide a standard mechanism for higher-level status reporting from a controller.
	// They are an extension mechanism which allows tools and other controllers to collect summary information about
	// resources without needing to understand resource-specific status details.
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ScheduleStatus defines the observed state of Schedule

func (*ScheduleStatus) DeepCopy

func (in *ScheduleStatus) DeepCopy() *ScheduleStatus

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

func (*ScheduleStatus) DeepCopyInto

func (in *ScheduleStatus) DeepCopyInto(out *ScheduleStatus)

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

type Snapshot

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

	Spec   SnapshotSpec   `json:"spec,omitempty"`
	Status SnapshotStatus `json:"status,omitempty"`
}

Snapshot is the Schema for the snapshots API

func (*Snapshot) DeepCopy

func (in *Snapshot) DeepCopy() *Snapshot

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

func (*Snapshot) DeepCopyInto

func (in *Snapshot) DeepCopyInto(out *Snapshot)

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

func (*Snapshot) DeepCopyObject

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

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

type SnapshotList

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

SnapshotList contains a list of Snapshot

func (*SnapshotList) DeepCopy

func (in *SnapshotList) DeepCopy() *SnapshotList

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

func (*SnapshotList) DeepCopyInto

func (in *SnapshotList) DeepCopyInto(out *SnapshotList)

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

func (*SnapshotList) DeepCopyObject

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

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

type SnapshotSpec

type SnapshotSpec struct {
	ID    *string      `json:"id,omitempty"`
	Date  *metav1.Time `json:"date,omitempty"`
	Paths *[]string    `json:"paths,omitempty"`
}

SnapshotSpec contains all information needed about a restic snapshot so it can be restored.

func (*SnapshotSpec) DeepCopy

func (in *SnapshotSpec) DeepCopy() *SnapshotSpec

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

func (*SnapshotSpec) DeepCopyInto

func (in *SnapshotSpec) DeepCopyInto(out *SnapshotSpec)

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

type SnapshotStatus

type SnapshotStatus struct {
}

SnapshotStatus defines the observed state of Snapshot

func (*SnapshotStatus) DeepCopy

func (in *SnapshotStatus) DeepCopy() *SnapshotStatus

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

func (*SnapshotStatus) DeepCopyInto

func (in *SnapshotStatus) DeepCopyInto(out *SnapshotStatus)

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

type Status

type Status struct {
	Started   bool `json:"started,omitempty"`
	Finished  bool `json:"finished,omitempty"`
	Exclusive bool `json:"exclusive,omitempty"`

	// Conditions provide a standard mechanism for higher-level status reporting from a controller.
	// They are an extension mechanism which allows tools and other controllers to collect summary information about
	// resources without needing to understand resource-specific status details.
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

Status defines the observed state of a generic K8up job. It is used for the operator to determine what to do.

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

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

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

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

func (Status) HasFailed added in v1.2.0

func (in Status) HasFailed() bool

HasFailed returns true in the following cases:

* If ConditionCompleted is true with any other reason than ReasonSucceeded.

* If ConditionPreBackupPodReady is false with any of the "failed" reasons.

func (Status) HasFailedPreBackup added in v1.2.0

func (in Status) HasFailedPreBackup() bool

HasFailedPreBackup returns true if ConditionPreBackupPodReady is false with any of the "failed" reasons.

func (Status) HasFinished added in v1.0.3

func (in Status) HasFinished() bool

HasFinished returns true if either HasFailed() or HasSucceeded() return true.

func (Status) HasStarted added in v1.0.3

func (in Status) HasStarted() bool

HasStarted returns true if ConditionProgressing is true with ReasonStarted, false otherwise.

func (Status) HasSucceeded added in v1.2.0

func (in Status) HasSucceeded() bool

HasSucceeded returns true if all cases are true:

* If ConditionCompleted is true with ReasonSucceeded.

* If ConditionPreBackupPodReady has no failure reason.

func (Status) IsWaitingForPreBackup added in v1.0.3

func (in Status) IsWaitingForPreBackup() bool

IsWaitingForPreBackup returns true if the ConditionPreBackupPodReady is Unknown with ReasonWaiting, false otherwise.

func (*Status) SetFinished added in v1.0.3

func (in *Status) SetFinished(message string)

SetFinished sets ConditionProgressing to false with ReasonFinished. It also sets the deprecated Finished flag to true.

func (*Status) SetStarted added in v1.0.3

func (in *Status) SetStarted(message string)

SetStarted sets ConditionReady to true with ReasonReady and ConditionProgressing with ReasonStarted. The given message parameter is set as the message for ConditionReady. It also sets the deprecated Started flag to true.

type SwiftSpec

type SwiftSpec struct {
	Container string `json:"container,omitempty"`
	Path      string `json:"path,omitempty"`
}

func (*SwiftSpec) DeepCopy

func (in *SwiftSpec) DeepCopy() *SwiftSpec

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

func (*SwiftSpec) DeepCopyInto

func (in *SwiftSpec) DeepCopyInto(out *SwiftSpec)

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

func (*SwiftSpec) EnvVars

func (in *SwiftSpec) EnvVars(vars map[string]*corev1.EnvVarSource) map[string]*corev1.EnvVarSource

EnvVars returns the env vars for this backend.

func (*SwiftSpec) String

func (in *SwiftSpec) String() string

String returns "swift:container:path"

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL