Skip to content

API reference

Generated from the Go types in api/v1alpha1 by crd-ref-docs. Do not edit this page by hand. Run make docs instead.

Package v1alpha1 contains API Schema definitions for the restore v1alpha1 API group.

AfterBackupTrigger starts a run after a backup completes.

Appears in:

Field Description Default Validation
delay Duration Delay is how long to wait after the backup completes before the run starts.

AutoExpand derives the scratch size from the source size. The formula is: clamp(source * (100 + percentage) / 100, min, max).

Appears in:

Field Description Default Validation
percentage integer Percentage is the headroom added to the source size, in percent.
min Quantity Min is the lower bound of the derived size.
max Quantity Max is the upper bound of the derived size.

BackupRef points to a backup object in the provider’s namespace.

Appears in:

Field Description Default Validation
name string Name is the name of the backup object.
namespace string Namespace is the namespace of the backup object.

BackupSelector chooses backups by name or by labels.

Appears in:

Field Description Default Validation
name string Name is the name of one backup object.
labels object (keys:string, values:string) Labels selects backup objects that carry all of these labels.

HandledBackup identifies the backup picked for one source.

Appears in:

Field Description Default Validation
sourcePVC string SourcePVC is the source this entry belongs to.
name string Name is the backup name.
createdAt Time CreatedAt is the time the backup completed.

LastRun records the outcome of the most recent run.

Appears in:

Field Description Default Validation
time Time Time is when the run finished.
result RunResult Result is the outcome of the run. Enum: [Succeeded Failed]
reason string Reason explains the result.

Underlying type: string

OverlapPolicy decides what happens when a trigger fires during a run.

Validation:

  • Enum: [Skip Queue Replace]

Appears in:

Field Description
Skip OverlapPolicySkip drops the new trigger while a run is in progress.
Queue OverlapPolicyQueue keeps one pending run and starts it after the current one.
Replace OverlapPolicyReplace cancels the running attempt and starts a new one.

Underlying type: string

Provider is the backup tool that performs a restore.

Validation:

  • Enum: [velero volsync kopiur]

Appears in:

Field Description
velero ProviderVelero restores with Velero.
volsync ProviderVolSync restores with VolSync.
kopiur ProviderKopiur restores with Kopiur.

ProviderRef identifies the native object created by the provider.

Appears in:

Field Description Default Validation
kind string Kind is the kind of the native object.
name string Name is the name of the native object.
namespace string Namespace is the namespace of the native object.

Restore is one restore run. It is manual or started by a RestoreTest.

Field Description Default Validation
apiVersion string bret.linogics.io/v1alpha1
kind string Restore
kind string Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Optional: {}
apiVersion string APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
Optional: {}
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec RestoreSpec Spec is the desired state of the restore. It cannot change after creation, so the status always
describes the backups in the spec.
status RestoreStatus Status is the observed state of the restore.

RestoreCheck is the check run against a restored volume.

Field Description Default Validation
apiVersion string bret.linogics.io/v1alpha1
kind string RestoreCheck
kind string Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Optional: {}
apiVersion string APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
Optional: {}
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec RestoreCheckSpec Spec is the desired check pod template.
status RestoreCheckStatus Status is the observed state of the check.

RestoreCheckRef names the RestoreCheck used for the check.

Appears in:

Field Description Default Validation
name string Name is the name of the RestoreCheck in the same namespace.

RestoreCheckSpec defines the desired check pod template.

Appears in:

Field Description Default Validation
restoredVolumes RestoredVolume array RestoredVolumes lists the restored volumes, each with its own mount path. MinItems: 1
initContainers Container array InitContainers run before the check containers.
containers Container array Containers run the check. Exit code 0 means pass. MinItems: 1
scratchVolumes ScratchVolume array ScratchVolumes are PVCs created for each attempt. They provide staging space and are deleted after the attempt.
volumes Volume array Volumes are extra volumes for the check pod. For example, ConfigMaps or Secrets.
securityContext PodSecurityContext SecurityContext is the pod-level security context. For example, fsGroup or runAsUser applies to all containers.
serviceAccountName string ServiceAccountName is the service account the check pod runs as.
automountServiceAccountToken boolean AutomountServiceAccountToken mounts the service account token in the check pod. Unset means false.
imagePullSecrets LocalObjectReference array ImagePullSecrets are secrets used to pull the check images from private registries.
nodeSelector object (keys:string, values:string) NodeSelector constrains the check pod to nodes with these labels.
tolerations Toleration array Tolerations allow the check pod to run on tainted nodes.
affinity Affinity Affinity is the pod affinity and anti-affinity for the check pod.
priorityClassName string PriorityClassName is the priority class of the check pod.
runtimeClassName string RuntimeClassName is the runtime class of the check pod.

RestoreCheckStatus defines the observed state of RestoreCheck.

Appears in:

Field Description Default Validation
conditions Condition array Conditions are the latest observations of the check state.
observedGeneration integer ObservedGeneration is the generation last processed by the controller.

Underlying type: string

RestorePhase is the lifecycle phase of a Restore.

Validation:

  • Enum: [Pending Running Succeeded Failed Canceled]

Appears in:

Field Description
Pending RestorePhasePending means the restore has not started yet.
Running RestorePhaseRunning means the restore is in progress.
Succeeded RestorePhaseSucceeded means the restore and check finished successfully.
Failed RestorePhaseFailed means the restore failed after all attempts.
Canceled RestorePhaseCanceled means the restore was stopped before it finished.

RestoreSource identifies one backup a Restore reads from and the scratch volume it writes into.

Appears in:

Field Description Default Validation
sourcePVC string SourcePVC is the name of the PVC in the backed-up namespace that this source restores. MaxLength: 63
Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
backupRef BackupRef BackupRef is the backup to restore. Velero sources all name the same Backup.
restoreAsOf Time RestoreAsOf restores the newest snapshot taken at or before this time. VolSync only.
Unset restores the newest snapshot.
storageClassName string StorageClassName is the storage class of the scratch volume.
size Quantity Size is the capacity of the scratch volume. When unset, AutoExpand derives it from the source size.
autoExpand AutoExpand AutoExpand derives the size from the source size when Size is unset.

RestoreSpec defines the desired state of Restore.

Appears in:

Field Description Default Validation
provider Provider Provider is the backup tool that performs the restore. Enum: [velero volsync kopiur]
sources RestoreSource array Sources are the backups to restore from, each with its scratch volume. MaxItems: 10
MinItems: 1
restoreCheckRef RestoreCheckRef RestoreCheckRef is the RestoreCheck that checks the restored data.
restoreWindow Duration RestoreWindow is the deadline for this attempt. It covers the restore, image pulls and the check. 45m
velero VeleroOptions Velero narrows what a Velero restore brings back. Velero only.
keepOnFailure boolean KeepOnFailure keeps the check pod, scratch volume and native restore object after a failed attempt. false

RestoreStatus defines the observed state of Restore.

Appears in:

Field Description Default Validation
phase RestorePhase Phase is the current lifecycle phase. Enum: [Pending Running Succeeded Failed Canceled]
attempt integer Attempt is the number of the current attempt, starting at 1.
startTime Time StartTime is when the first attempt started.
deadline Time Deadline is when the current attempt times out.
providerRefs ProviderRef array ProviderRefs are the native objects created by the provider.
resolvedSizes object (keys:string, values:Quantity) ResolvedSizes maps each sourcePVC to the scratch size resolved on the first reconcile. Later reconciles reuse it.
Velero uses the empty key.
message string Message is a human-readable detail about the current phase.
conditions Condition array Conditions are the latest observations of the restore state.

RestoreTarget describes the scratch volume a Restore writes into.

Appears in:

Field Description Default Validation
storageClassName string StorageClassName is the storage class of the scratch volume.
size Quantity Size is the capacity of the scratch volume. When unset, AutoExpand derives it from the source size.
autoExpand AutoExpand AutoExpand derives the size from the source size when Size is unset.

RestoreTest schedules restore runs and sets their policy.

Field Description Default Validation
apiVersion string bret.linogics.io/v1alpha1
kind string RestoreTest
kind string Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Optional: {}
apiVersion string APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
Optional: {}
metadata ObjectMeta Refer to Kubernetes API documentation for fields of metadata.
spec RestoreTestSpec Spec is the desired state of the test.
status RestoreTestStatus Status is the observed state of the test.

RestoreTestSource is one volume a RestoreTest restores: the PVC, the backups to pick from, and the scratch target.

Appears in:

Field Description Default Validation
sourcePVC string SourcePVC is the name of the PVC in the backed-up namespace. MaxLength: 63
Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
backupSelector BackupSelector BackupSelector chooses which backups the restore reads from.
storageClassName string StorageClassName is the storage class of the scratch volume.
size Quantity Size is the capacity of the scratch volume. When unset, AutoExpand derives it from the source size.
autoExpand AutoExpand AutoExpand derives the size from the source size when Size is unset.

RestoreTestSpec defines the desired state of RestoreTest.

Appears in:

Field Description Default Validation
provider Provider Provider is the backup tool that performs the restores. Enum: [velero volsync kopiur]
sources RestoreTestSource array Sources are the volumes each run restores. MaxItems: 10
MinItems: 1
restoreCheckRef RestoreCheckRef RestoreCheckRef names the check to run against each restored volume.
velero VeleroOptions Velero narrows what each Velero restore brings back. Velero only.
triggers Triggers Triggers defines what starts a run.
restoreWindow Duration RestoreWindow is the deadline for each attempt. 45m
retries Retries Retries defines how failed attempts are retried. { }
keepOnFailure boolean KeepOnFailure keeps the check pod and restore objects after the final attempt fails. false
overlapPolicy OverlapPolicy OverlapPolicy decides what happens when a trigger fires during a run. Skip Enum: [Skip Queue Replace]

RestoreTestStatus defines the observed state of RestoreTest.

Appears in:

Field Description Default Validation
lastRun LastRun LastRun is the outcome of the most recent run.
lastSuccess Time LastSuccess is the time of the last run that passed. It drives the success metric.
nextRun Time NextRun is when the next cron run is scheduled.
lastHandledBackups HandledBackup array LastHandledBackups is the newest backup that an afterBackup trigger used. Only newer backups start a run.
retainedResources string array RetainedResources lists objects kept after a failed run. They help debugging.
currentRestore string CurrentRestore is the Restore of the run in progress. It is empty when no run is in progress.
retryAt Time RetryAt is when the next attempt of the run in progress is created.
pendingBackups HandledBackup array PendingBackups are the backups of the queued run, one per source. The run waits for the run in progress.
It applies to overlap policy Queue.
pendingRunSource string PendingRunSource is the trigger source of the queued run. It keeps the name of the queued Restore stable across reconciles.
lastRunNowValue string LastRunNowValue is the last value of the run-now annotation that started a run.
conditions Condition array Conditions are the latest observations of the test state.

RestoredVolume maps one restored PVC to a mount path in the check pod.

Appears in:

Field Description Default Validation
sourcePVC string SourcePVC is the name of the PVC in the backed-up namespace that this volume restores. MaxLength: 63
Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
mountPath string MountPath is where the restored volume is mounted in every container. MinLength: 1

Retries defines how often a failed attempt is retried.

Appears in:

Field Description Default Validation
count integer Count is the number of retries after the first attempt. 0 Maximum: 10
Minimum: 0
backoff Duration Backoff is the wait between attempts. 5m

Underlying type: string

RunResult is the outcome of the last run of a RestoreTest.

Validation:

  • Enum: [Succeeded Failed]

Appears in:

Field Description
Succeeded RunResultSucceeded means the last run passed.
Failed RunResultFailed means the last run failed.

ScratchVolume is a PVC that the operator creates for each attempt. It provides staging space for the check.

Appears in:

Field Description Default Validation
name string Name is the name of the scratch volume. MinLength: 1
Pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
mountPath string MountPath is where the scratch volume is mounted in every container.
storageClassName string StorageClassName is the storage class for the scratch PVC. Empty means the cluster default.
size Quantity Size is the requested capacity of the scratch PVC, for example 20Gi.

Triggers defines what starts a run.

Appears in:

Field Description Default Validation
cron string Cron is a 5-field cron schedule evaluated in UTC. Pattern: ^(\S+\s+)\{4\}\S+$
afterBackup AfterBackupTrigger AfterBackup starts a run after a matching backup completes.
manual boolean Manual enables starting a run by changing the run-now annotation. false

VeleroOptions narrows what a Velero restore brings back.

Appears in:

Field Description Default Validation
labelSelector LabelSelector LabelSelector selects the namespace objects to restore.
orLabelSelectors LabelSelector array OrLabelSelectors select the namespace objects to restore, any one may match.