v1alpha1

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: Apache-2.0 Package v1alpha1 defines backups.cozystack.io API types.

Group: backups.cozystack.io Version: v1alpha1

SPDX-License-Identifier: Apache-2.0 Package v1alpha1 defines backups.cozystack.io API types.

Group: backups.cozystack.io Version: v1alpha1

Package v1alpha1 contains API Schema definitions for the v1alpha1 API group. +kubebuilder:object:generate=true +groupName=backups.cozystack.io

SPDX-License-Identifier: Apache-2.0 Package v1alpha1 defines backups.cozystack.io API types.

Group: backups.cozystack.io Version: v1alpha1

SPDX-License-Identifier: Apache-2.0 Package v1alpha1 defines backups.cozystack.io API types.

Group: backups.cozystack.io Version: v1alpha1

Index

Constants

View Source
const (
	OwningJobNameLabel      = thisGroup + "/owned-by.BackupJobName"
	OwningJobNamespaceLabel = thisGroup + "/owned-by.BackupJobNamespace"
)
View Source
const (
	PlanConditionError = "Error"
)

Condtions

Variables

View Source
var (
	GroupVersion  = schema.GroupVersion{Group: thisGroup, Version: thisVersion}
	SchemeBuilder = runtime.NewSchemeBuilder(addGroupVersion)
	AddToScheme   = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Backup

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

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

Backup represents a single backup artifact for a given application.

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.

type BackupArtifact

type BackupArtifact struct {
	// URI is a driver-/storage-specific URI pointing to the backup artifact.
	// For example: s3://bucket/prefix/file.tar.gz
	URI string `json:"uri"`

	// SizeBytes is the size of the artifact in bytes, if known.
	// +optional
	SizeBytes int64 `json:"sizeBytes,omitempty"`

	// Checksum is the checksum of the artifact, if computed.
	// For example: "sha256:<hex>".
	// +optional
	Checksum string `json:"checksum,omitempty"`
}

BackupArtifact describes the stored backup object (tarball, snapshot, etc.).

func (*BackupArtifact) DeepCopy

func (in *BackupArtifact) DeepCopy() *BackupArtifact

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

func (*BackupArtifact) DeepCopyInto

func (in *BackupArtifact) DeepCopyInto(out *BackupArtifact)

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

type BackupJob

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

	Spec   BackupJobSpec   `json:"spec,omitempty"`
	Status BackupJobStatus `json:"status,omitempty"`
}

BackupJob represents a single execution of a backup. It is typically created by a Plan controller when a schedule fires.

func (*BackupJob) DeepCopy

func (in *BackupJob) DeepCopy() *BackupJob

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

func (*BackupJob) DeepCopyInto

func (in *BackupJob) DeepCopyInto(out *BackupJob)

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

func (*BackupJob) DeepCopyObject

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

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

type BackupJobList

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

BackupJobList contains a list of BackupJobs.

func (*BackupJobList) DeepCopy

func (in *BackupJobList) DeepCopy() *BackupJobList

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

func (*BackupJobList) DeepCopyInto

func (in *BackupJobList) DeepCopyInto(out *BackupJobList)

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

func (*BackupJobList) DeepCopyObject

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

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

type BackupJobPhase

type BackupJobPhase string

BackupJobPhase represents the lifecycle phase of a BackupJob.

const (
	BackupJobPhaseEmpty     BackupJobPhase = ""
	BackupJobPhasePending   BackupJobPhase = "Pending"
	BackupJobPhaseRunning   BackupJobPhase = "Running"
	BackupJobPhaseSucceeded BackupJobPhase = "Succeeded"
	BackupJobPhaseFailed    BackupJobPhase = "Failed"
)

type BackupJobSpec

type BackupJobSpec struct {
	// PlanRef refers to the Plan that requested this backup run.
	// For ad-hoc/manual backups, this can be omitted.
	// +optional
	PlanRef *corev1.LocalObjectReference `json:"planRef,omitempty"`

	// ApplicationRef holds a reference to the managed application whose state
	// is being backed up.
	ApplicationRef corev1.TypedLocalObjectReference `json:"applicationRef"`

	// StorageRef holds a reference to the Storage object that describes where
	// the backup will be stored.
	StorageRef corev1.TypedLocalObjectReference `json:"storageRef"`

	// StrategyRef holds a reference to the driver-specific BackupStrategy object
	// that describes how the backup should be created.
	StrategyRef corev1.TypedLocalObjectReference `json:"strategyRef"`
}

BackupJobSpec describes the execution of a single backup operation.

func (*BackupJobSpec) DeepCopy

func (in *BackupJobSpec) DeepCopy() *BackupJobSpec

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

func (*BackupJobSpec) DeepCopyInto

func (in *BackupJobSpec) DeepCopyInto(out *BackupJobSpec)

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

type BackupJobStatus

type BackupJobStatus struct {
	// Phase is a high-level summary of the run's state.
	// Typical values: Pending, Running, Succeeded, Failed.
	// +optional
	Phase BackupJobPhase `json:"phase,omitempty"`

	// BackupRef refers to the Backup object created by this run, if any.
	// +optional
	BackupRef *corev1.LocalObjectReference `json:"backupRef,omitempty"`

	// StartedAt is the time at which the backup run started.
	// +optional
	StartedAt *metav1.Time `json:"startedAt,omitempty"`

	// CompletedAt is the time at which the backup run completed (successfully
	// or otherwise).
	// +optional
	CompletedAt *metav1.Time `json:"completedAt,omitempty"`

	// Message is a human-readable message indicating details about why the
	// backup run is in its current phase, if any.
	// +optional
	Message string `json:"message,omitempty"`

	// Conditions represents the latest available observations of a BackupJob's state.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

BackupJobStatus represents the observed state of a BackupJob.

func (*BackupJobStatus) DeepCopy

func (in *BackupJobStatus) DeepCopy() *BackupJobStatus

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

func (*BackupJobStatus) DeepCopyInto

func (in *BackupJobStatus) DeepCopyInto(out *BackupJobStatus)

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

type BackupList

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

BackupList contains a list of Backups.

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.

type BackupPhase

type BackupPhase string

BackupPhase represents the lifecycle phase of a Backup.

const (
	BackupPhaseEmpty   BackupPhase = ""
	BackupPhasePending BackupPhase = "Pending"
	BackupPhaseReady   BackupPhase = "Ready"
	BackupPhaseFailed  BackupPhase = "Failed"
)

type BackupSpec

type BackupSpec struct {
	// ApplicationRef refers to the application that was backed up.
	ApplicationRef corev1.TypedLocalObjectReference `json:"applicationRef"`

	// PlanRef refers to the Plan that produced this backup, if any.
	// For manually triggered backups, this can be omitted.
	// +optional
	PlanRef *corev1.LocalObjectReference `json:"planRef,omitempty"`

	// StorageRef refers to the Storage object that describes where the backup
	// artifact is stored.
	StorageRef corev1.TypedLocalObjectReference `json:"storageRef"`

	// StrategyRef refers to the driver-specific BackupStrategy that was used
	// to create this backup. This allows the driver to later perform restores.
	StrategyRef corev1.TypedLocalObjectReference `json:"strategyRef"`

	// TakenAt is the time at which the backup was taken (as reported by the
	// driver). It may differ slightly from metadata.creationTimestamp.
	TakenAt metav1.Time `json:"takenAt"`

	// DriverMetadata holds driver-specific, opaque metadata associated with
	// this backup (for example snapshot IDs, schema versions, etc.).
	// This data is not interpreted by the core backup controllers.
	// +optional
	DriverMetadata map[string]string `json:"driverMetadata,omitempty"`
}

BackupSpec describes an immutable backup artifact produced by a BackupJob.

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 BackupStatus

type BackupStatus struct {
	// Phase is a simple, high-level summary of the backup's state.
	// Typical values are: Pending, Ready, Failed.
	// +optional
	Phase BackupPhase `json:"phase,omitempty"`

	// Artifact describes the stored backup object, if available.
	// +optional
	Artifact *BackupArtifact `json:"artifact,omitempty"`

	// Conditions represents the latest available observations of a Backup's state.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

BackupStatus represents the observed state of a Backup.

func (*BackupStatus) DeepCopy

func (in *BackupStatus) DeepCopy() *BackupStatus

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

func (*BackupStatus) DeepCopyInto

func (in *BackupStatus) DeepCopyInto(out *BackupStatus)

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

type Plan

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

	Spec   PlanSpec   `json:"spec,omitempty"`
	Status PlanStatus `json:"status,omitempty"`
}

Plan describes the schedule, method and storage location for the backup of a given target application.

func (*Plan) DeepCopy

func (in *Plan) DeepCopy() *Plan

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

func (*Plan) DeepCopyInto

func (in *Plan) DeepCopyInto(out *Plan)

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

func (*Plan) DeepCopyObject

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

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

type PlanList

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

PlanList contains a list of backup Plans.

func (*PlanList) DeepCopy

func (in *PlanList) DeepCopy() *PlanList

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

func (*PlanList) DeepCopyInto

func (in *PlanList) DeepCopyInto(out *PlanList)

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

func (*PlanList) DeepCopyObject

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

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

type PlanSchedule

type PlanSchedule struct {
	// Type is the type of schedule specification. Supported values are
	// [`cron`]. If omitted, defaults to `cron`.
	// +optional
	Type PlanScheduleType `json:"type,omitempty"`

	// Cron contains the cron spec for scheduling backups. Must be
	// specified if the schedule type is `cron`. Since only `cron` is
	// supported, omitting this field is not allowed.
	// +optional
	Cron string `json:"cron,omitempty"`
}

PlanSchedule specifies when backup copies are created.

func (*PlanSchedule) DeepCopy

func (in *PlanSchedule) DeepCopy() *PlanSchedule

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

func (*PlanSchedule) DeepCopyInto

func (in *PlanSchedule) DeepCopyInto(out *PlanSchedule)

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

type PlanScheduleType

type PlanScheduleType string
const (
	PlanScheduleTypeEmpty PlanScheduleType = ""
	PlanScheduleTypeCron  PlanScheduleType = "cron"
)

type PlanSpec

type PlanSpec struct {
	// ApplicationRef holds a reference to the managed application,
	// whose state and configuration must be backed up.
	ApplicationRef corev1.TypedLocalObjectReference `json:"applicationRef"`

	// StorageRef holds a reference to the Storage object that
	// describes the location where the backup will be stored.
	StorageRef corev1.TypedLocalObjectReference `json:"storageRef"`

	// StrategyRef holds a reference to the Strategy object that
	// describes, how a backup copy is to be created.
	StrategyRef corev1.TypedLocalObjectReference `json:"strategyRef"`

	// Schedule specifies when backup copies are created.
	Schedule PlanSchedule `json:"schedule"`
}

PlanSpec references the storage, the strategy, the application to be backed up and specifies the timetable on which the backups will run.

func (*PlanSpec) DeepCopy

func (in *PlanSpec) DeepCopy() *PlanSpec

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

func (*PlanSpec) DeepCopyInto

func (in *PlanSpec) DeepCopyInto(out *PlanSpec)

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

type PlanStatus

type PlanStatus struct {
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

func (*PlanStatus) DeepCopy

func (in *PlanStatus) DeepCopy() *PlanStatus

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

func (*PlanStatus) DeepCopyInto

func (in *PlanStatus) DeepCopyInto(out *PlanStatus)

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

type RestoreJob

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

	Spec   RestoreJobSpec   `json:"spec,omitempty"`
	Status RestoreJobStatus `json:"status,omitempty"`
}

RestoreJob represents a single execution of a restore from a Backup.

func (*RestoreJob) DeepCopy

func (in *RestoreJob) DeepCopy() *RestoreJob

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

func (*RestoreJob) DeepCopyInto

func (in *RestoreJob) DeepCopyInto(out *RestoreJob)

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

func (*RestoreJob) DeepCopyObject

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

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

type RestoreJobList

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

RestoreJobList contains a list of RestoreJobs.

func (*RestoreJobList) DeepCopy

func (in *RestoreJobList) DeepCopy() *RestoreJobList

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

func (*RestoreJobList) DeepCopyInto

func (in *RestoreJobList) DeepCopyInto(out *RestoreJobList)

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

func (*RestoreJobList) DeepCopyObject

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

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

type RestoreJobPhase

type RestoreJobPhase string

RestoreJobPhase represents the lifecycle phase of a RestoreJob.

const (
	RestoreJobPhaseEmpty     RestoreJobPhase = ""
	RestoreJobPhasePending   RestoreJobPhase = "Pending"
	RestoreJobPhaseRunning   RestoreJobPhase = "Running"
	RestoreJobPhaseSucceeded RestoreJobPhase = "Succeeded"
	RestoreJobPhaseFailed    RestoreJobPhase = "Failed"
)

type RestoreJobSpec

type RestoreJobSpec struct {
	// BackupRef refers to the Backup that should be restored.
	BackupRef corev1.LocalObjectReference `json:"backupRef"`

	// TargetApplicationRef refers to the application into which the backup
	// should be restored. If omitted, the driver SHOULD restore into the same
	// application as referenced by backup.spec.applicationRef.
	// +optional
	TargetApplicationRef *corev1.TypedLocalObjectReference `json:"targetApplicationRef,omitempty"`
}

RestoreJobSpec describes the execution of a single restore operation.

func (*RestoreJobSpec) DeepCopy

func (in *RestoreJobSpec) DeepCopy() *RestoreJobSpec

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

func (*RestoreJobSpec) DeepCopyInto

func (in *RestoreJobSpec) DeepCopyInto(out *RestoreJobSpec)

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

type RestoreJobStatus

type RestoreJobStatus struct {
	// Phase is a high-level summary of the run's state.
	// Typical values: Pending, Running, Succeeded, Failed.
	// +optional
	Phase RestoreJobPhase `json:"phase,omitempty"`

	// StartedAt is the time at which the restore run started.
	// +optional
	StartedAt *metav1.Time `json:"startedAt,omitempty"`

	// CompletedAt is the time at which the restore run completed (successfully
	// or otherwise).
	// +optional
	CompletedAt *metav1.Time `json:"completedAt,omitempty"`

	// Message is a human-readable message indicating details about why the
	// restore run is in its current phase, if any.
	// +optional
	Message string `json:"message,omitempty"`

	// Conditions represents the latest available observations of a RestoreJob's state.
	// +optional
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

RestoreJobStatus represents the observed state of a RestoreJob.

func (*RestoreJobStatus) DeepCopy

func (in *RestoreJobStatus) DeepCopy() *RestoreJobStatus

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

func (*RestoreJobStatus) DeepCopyInto

func (in *RestoreJobStatus) DeepCopyInto(out *RestoreJobStatus)

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