v1

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1 is the v1 version of the API. +groupName=ark.heptio.com

Index

Constants

View Source
const (
	// DefaultNamespace is the Kubernetes namespace that is used by default for
	// the Ark server and API objects.
	DefaultNamespace = "heptio-ark"

	// ResourcesDir is a top-level directory expected in backups which contains sub-directories
	// for each resource type in the backup.
	ResourcesDir = "resources"

	// RestoreLabelKey is the label key that's applied to all resources that
	// are created during a restore. This is applied for ease of identification
	// of restored resources. The value will be the restore's name.
	RestoreLabelKey = "ark-restore"

	// ClusterScopedDir is the name of the directory containing cluster-scoped
	// resources within an Ark backup.
	ClusterScopedDir = "cluster"

	// NamespaceScopedDir is the name of the directory containing namespace-scoped
	// resource within an Ark backup.
	NamespaceScopedDir = "namespaces"
)
View Source
const GroupName = "ark.heptio.com"

GroupName is the group name for the Ark API

Variables

View Source
var (
	// SchemeBuilder collects the scheme builder functions for the Ark API
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme applies the SchemeBuilder functions to a specified scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}

SchemeGroupVersion is the GroupVersion for the Ark API

Functions

func GetGeneratedDeepCopyFuncs deprecated added in v0.6.0

func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc

GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.

Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.

func Resource

func Resource(resource string) schema.GroupResource

Resource gets an Ark GroupResource for a specified resource

Types

type Backup

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

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

Backup is an Ark resource that respresents the capture of Kubernetes cluster state at a point in time (API objects and associated volume state).

func (*Backup) DeepCopy added in v0.6.0

func (in *Backup) DeepCopy() *Backup

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

func (*Backup) DeepCopyInto added in v0.6.0

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 added in v0.6.0

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

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

type BackupHooks added in v0.5.0

type BackupHooks struct {
	// Resources are hooks that should be executed when backing up individual instances of a resource.
	Resources []BackupResourceHookSpec `json:"resources"`
}

BackupHooks contains custom behaviors that should be executed at different phases of the backup.

func (*BackupHooks) DeepCopy added in v0.6.0

func (in *BackupHooks) DeepCopy() *BackupHooks

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

func (*BackupHooks) DeepCopyInto added in v0.6.0

func (in *BackupHooks) DeepCopyInto(out *BackupHooks)

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"`
	Items           []Backup `json:"items"`
}

BackupList is a list of Backups.

func (*BackupList) DeepCopy added in v0.6.0

func (in *BackupList) DeepCopy() *BackupList

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

func (*BackupList) DeepCopyInto added in v0.6.0

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 added in v0.6.0

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 is a string representation of the lifecycle phase of an Ark backup.

const (
	// BackupPhaseNew means the backup has been created but not
	// yet processed by the BackupController.
	BackupPhaseNew BackupPhase = "New"

	// BackupPhaseFailedValidation means the backup has failed
	// the controller's validations and therefore will not run.
	BackupPhaseFailedValidation BackupPhase = "FailedValidation"

	// BackupPhaseInProgress means the backup is currently executing.
	BackupPhaseInProgress BackupPhase = "InProgress"

	// BackupPhaseCompleted means the backup has run successfully without
	// errors.
	BackupPhaseCompleted BackupPhase = "Completed"

	// BackupPhaseFailed mean the backup ran but encountered an error that
	// prevented it from completing successfully.
	BackupPhaseFailed BackupPhase = "Failed"
)

type BackupResourceHook added in v0.5.0

type BackupResourceHook struct {
	// Exec defines an exec hook.
	Exec *ExecHook `json:"exec"`
}

BackupResourceHook defines a hook for a resource.

func (*BackupResourceHook) DeepCopy added in v0.6.0

func (in *BackupResourceHook) DeepCopy() *BackupResourceHook

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

func (*BackupResourceHook) DeepCopyInto added in v0.6.0

func (in *BackupResourceHook) DeepCopyInto(out *BackupResourceHook)

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

type BackupResourceHookSpec added in v0.5.0

type BackupResourceHookSpec struct {
	// Name is the name of this hook.
	Name string `json:"name"`
	// IncludedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies
	// to all namespaces.
	IncludedNamespaces []string `json:"includedNamespaces"`
	// ExcludedNamespaces specifies the namespaces to which this hook spec does not apply.
	ExcludedNamespaces []string `json:"excludedNamespaces"`
	// IncludedResources specifies the resources to which this hook spec applies. If empty, it applies
	// to all resources.
	IncludedResources []string `json:"includedResources"`
	// ExcludedResources specifies the resources to which this hook spec does not apply.
	ExcludedResources []string `json:"excludedResources"`
	// LabelSelector, if specified, filters the resources to which this hook spec applies.
	LabelSelector *metav1.LabelSelector `json:"labelSelector"`
	// Hooks is a list of BackupResourceHooks to execute.
	Hooks []BackupResourceHook `json:"hooks"`
}

BackupResourceHookSpec defines one or more BackupResourceHooks that should be executed based on the rules defined for namespaces, resources, and label selector.

func (*BackupResourceHookSpec) DeepCopy added in v0.6.0

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

func (*BackupResourceHookSpec) DeepCopyInto added in v0.6.0

func (in *BackupResourceHookSpec) DeepCopyInto(out *BackupResourceHookSpec)

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

type BackupSpec

type BackupSpec struct {
	// IncludedNamespaces is a slice of namespace names to include objects
	// from. If empty, all namespaces are included.
	IncludedNamespaces []string `json:"includedNamespaces"`

	// ExcludedNamespaces contains a list of namespaces that are not
	// included in the backup.
	ExcludedNamespaces []string `json:"excludedNamespaces"`

	// IncludedResources is a slice of resource names to include
	// in the backup. If empty, all resources are included.
	IncludedResources []string `json:"includedResources"`

	// ExcludedResources is a slice of resource names that are not
	// included in the backup.
	ExcludedResources []string `json:"excludedResources"`

	// LabelSelector is a metav1.LabelSelector to filter with
	// when adding individual objects to the backup. If empty
	// or nil, all objects are included. Optional.
	LabelSelector *metav1.LabelSelector `json:"labelSelector"`

	// SnapshotVolumes specifies whether to take cloud snapshots
	// of any PV's referenced in the set of objects included
	// in the Backup.
	SnapshotVolumes *bool `json:"snapshotVolumes"`

	// TTL is a time.Duration-parseable string describing how long
	// the Backup should be retained for.
	TTL metav1.Duration `json:"ttl"`

	// IncludeClusterResources specifies whether cluster-scoped resources
	// should be included for consideration in the backup.
	IncludeClusterResources *bool `json:"includeClusterResources"`

	// Hooks represent custom behaviors that should be executed at different phases of the backup.
	Hooks BackupHooks `json:"hooks"`
}

BackupSpec defines the specification for an Ark backup.

func (*BackupSpec) DeepCopy added in v0.6.0

func (in *BackupSpec) DeepCopy() *BackupSpec

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

func (*BackupSpec) DeepCopyInto added in v0.6.0

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 {
	// Version is the backup format version.
	Version int `json:"version"`

	// Expiration is when this Backup is eligible for garbage-collection.
	Expiration metav1.Time `json:"expiration"`

	// Phase is the current state of the Backup.
	Phase BackupPhase `json:"phase"`

	// VolumeBackups is a map of PersistentVolume names to
	// information about the backed-up volume in the cloud
	// provider API.
	VolumeBackups map[string]*VolumeBackupInfo `json:"volumeBackups"`

	// ValidationErrors is a slice of all validation errors (if
	// applicable).
	ValidationErrors []string `json:"validationErrors"`
}

BackupStatus captures the current status of an Ark backup.

func (*BackupStatus) DeepCopy added in v0.6.0

func (in *BackupStatus) DeepCopy() *BackupStatus

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

func (*BackupStatus) DeepCopyInto added in v0.6.0

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

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

type CloudProviderConfig

type CloudProviderConfig struct {
	Name string `json:"name"`

	Config map[string]string `json:"config"`
}

CloudProviderConfig is configuration information about how to connect to a particular cloud.

func (*CloudProviderConfig) DeepCopy added in v0.6.0

func (in *CloudProviderConfig) DeepCopy() *CloudProviderConfig

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

func (*CloudProviderConfig) DeepCopyInto added in v0.6.0

func (in *CloudProviderConfig) DeepCopyInto(out *CloudProviderConfig)

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

type Config

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

	// PersistentVolumeProvider is the configuration information for the cloud where
	// the cluster is running and has PersistentVolumes to snapshot or restore. Optional.
	PersistentVolumeProvider *CloudProviderConfig `json:"persistentVolumeProvider"`

	// BackupStorageProvider is the configuration information for the cloud where
	// Ark backups are stored in object storage. This may be a different cloud than
	// where the cluster is running.
	BackupStorageProvider ObjectStorageProviderConfig `json:"backupStorageProvider"`

	// BackupSyncPeriod is how often the BackupSyncController runs to ensure all
	// Ark backups in object storage exist as Backup API objects in the cluster.
	BackupSyncPeriod metav1.Duration `json:"backupSyncPeriod"`

	// GCSyncPeriod is how often the GCController runs to delete expired backup
	// API objects and corresponding backup files in object storage.
	GCSyncPeriod metav1.Duration `json:"gcSyncPeriod"`

	// ScheduleSyncPeriod is how often the ScheduleController runs to check for
	// new backups that should be triggered based on schedules.
	ScheduleSyncPeriod metav1.Duration `json:"scheduleSyncPeriod"`

	// ResourcePriorities is an ordered slice of resources specifying the desired
	// order of resource restores. Any resources not in the list will be restored
	// alphabetically after the prioritized resources.
	ResourcePriorities []string `json:"resourcePriorities"`

	// RestoreOnlyMode is whether Ark should run in a mode where only restores
	// are allowed; backups, schedules, and garbage-collection are all disabled.
	RestoreOnlyMode bool `json:"restoreOnlyMode"`
}

Config is an Ark resource that captures configuration information to be used for running the Ark server.

func (*Config) DeepCopy added in v0.6.0

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto added in v0.6.0

func (in *Config) DeepCopyInto(out *Config)

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

func (*Config) DeepCopyObject added in v0.6.0

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

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

type ConfigList

type ConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []Config `json:"items"`
}

ConfigList is a list of Configs.

func (*ConfigList) DeepCopy added in v0.6.0

func (in *ConfigList) DeepCopy() *ConfigList

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

func (*ConfigList) DeepCopyInto added in v0.6.0

func (in *ConfigList) DeepCopyInto(out *ConfigList)

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

func (*ConfigList) DeepCopyObject added in v0.6.0

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

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

type DownloadRequest added in v0.4.0

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

	Spec   DownloadRequestSpec   `json:"spec"`
	Status DownloadRequestStatus `json:"status,omitempty"`
}

DownloadRequest is a request to download an artifact from backup object storage, such as a backup log file.

func (*DownloadRequest) DeepCopy added in v0.6.0

func (in *DownloadRequest) DeepCopy() *DownloadRequest

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

func (*DownloadRequest) DeepCopyInto added in v0.6.0

func (in *DownloadRequest) DeepCopyInto(out *DownloadRequest)

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

func (*DownloadRequest) DeepCopyObject added in v0.6.0

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

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

type DownloadRequestList added in v0.4.0

type DownloadRequestList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []DownloadRequest `json:"items"`
}

DownloadRequestList is a list of DownloadRequests.

func (*DownloadRequestList) DeepCopy added in v0.6.0

func (in *DownloadRequestList) DeepCopy() *DownloadRequestList

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

func (*DownloadRequestList) DeepCopyInto added in v0.6.0

func (in *DownloadRequestList) DeepCopyInto(out *DownloadRequestList)

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

func (*DownloadRequestList) DeepCopyObject added in v0.6.0

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

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

type DownloadRequestPhase added in v0.4.0

type DownloadRequestPhase string

DownloadRequestPhase represents the lifecycle phase of a DownloadRequest.

const (
	// DownloadRequestPhaseNew means the DownloadRequest has not been processed by the
	// DownloadRequestController yet.
	DownloadRequestPhaseNew DownloadRequestPhase = "New"
	// DownloadRequestPhaseProcessed means the DownloadRequest has been processed by the
	// DownloadRequestController.
	DownloadRequestPhaseProcessed DownloadRequestPhase = "Processed"
)

type DownloadRequestSpec added in v0.4.0

type DownloadRequestSpec struct {
	// Target is what to download (e.g. logs for a backup).
	Target DownloadTarget `json:"target"`
}

DownloadRequestSpec is the specification for a download request.

func (*DownloadRequestSpec) DeepCopy added in v0.6.0

func (in *DownloadRequestSpec) DeepCopy() *DownloadRequestSpec

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

func (*DownloadRequestSpec) DeepCopyInto added in v0.6.0

func (in *DownloadRequestSpec) DeepCopyInto(out *DownloadRequestSpec)

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

type DownloadRequestStatus added in v0.4.0

type DownloadRequestStatus struct {
	// Phase is the current state of the DownloadRequest.
	Phase DownloadRequestPhase `json:"phase"`
	// DownloadURL contains the pre-signed URL for the target file.
	DownloadURL string `json:"downloadURL"`
	// Expiration is when this DownloadRequest expires and can be deleted by the system.
	Expiration metav1.Time `json:"expiration"`
}

DownloadRequestStatus is the current status of a DownloadRequest.

func (*DownloadRequestStatus) DeepCopy added in v0.6.0

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

func (*DownloadRequestStatus) DeepCopyInto added in v0.6.0

func (in *DownloadRequestStatus) DeepCopyInto(out *DownloadRequestStatus)

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

type DownloadTarget added in v0.4.0

type DownloadTarget struct {
	// Kind is the type of file to download.
	Kind DownloadTargetKind `json:"kind"`
	// Name is the name of the kubernetes resource with which the file is associated.
	Name string `json:"name"`
}

DownloadTarget is the specification for what kind of file to download, and the name of the resource with which it's associated.

func (*DownloadTarget) DeepCopy added in v0.6.0

func (in *DownloadTarget) DeepCopy() *DownloadTarget

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

func (*DownloadTarget) DeepCopyInto added in v0.6.0

func (in *DownloadTarget) DeepCopyInto(out *DownloadTarget)

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

type DownloadTargetKind added in v0.4.0

type DownloadTargetKind string

DownloadTargetKind represents what type of file to download.

const (
	DownloadTargetKindBackupLog      DownloadTargetKind = "BackupLog"
	DownloadTargetKindBackupContents DownloadTargetKind = "BackupContents"
	DownloadTargetKindRestoreLog     DownloadTargetKind = "RestoreLog"
	DownloadTargetKindRestoreResults DownloadTargetKind = "RestoreResults"
)

type ExecHook added in v0.5.0

type ExecHook struct {
	// Container is the container in the pod where the command should be executed. If not specified,
	// the pod's first container is used.
	Container string `json:"container"`
	// Command is the command and arguments to execute.
	Command []string `json:"command"`
	// OnError specifies how Ark should behave if it encounters an error executing this hook.
	OnError HookErrorMode `json:"onError"`
	// Timeout defines the maximum amount of time Ark should wait for the hook to complete before
	// considering the execution a failure.
	Timeout metav1.Duration `json:"timeout"`
}

ExecHook is a hook that uses the pod exec API to execute a command in a container in a pod.

func (*ExecHook) DeepCopy added in v0.6.0

func (in *ExecHook) DeepCopy() *ExecHook

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

func (*ExecHook) DeepCopyInto added in v0.6.0

func (in *ExecHook) DeepCopyInto(out *ExecHook)

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

type HookErrorMode added in v0.5.0

type HookErrorMode string

HookErrorMode defines how Ark should treat an error from a hook.

const (
	// HookErrorModeContinue means that an error from a hook is acceptable, and the backup can
	// proceed.
	HookErrorModeContinue HookErrorMode = "Continue"
	// HookErrorModeFail means that an error from a hook is problematic, and the backup should be in
	// error.
	HookErrorModeFail HookErrorMode = "Fail"
)

type ObjectStorageProviderConfig

type ObjectStorageProviderConfig struct {
	// CloudProviderConfig is the configuration information for the cloud where
	// Ark backups are stored in object storage.
	CloudProviderConfig `json:",inline"`

	// Bucket is the name of the bucket in object storage where Ark backups
	// are stored.
	Bucket string `json:"bucket"`
}

ObjectStorageProviderConfig is configuration information for connecting to a particular bucket in object storage to access Ark backups.

func (*ObjectStorageProviderConfig) DeepCopy added in v0.6.0

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

func (*ObjectStorageProviderConfig) DeepCopyInto added in v0.6.0

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

type Restore

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

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

Restore is an Ark resource that represents the application of resources from an Ark backup to a target Kubernetes cluster.

func (*Restore) DeepCopy added in v0.6.0

func (in *Restore) DeepCopy() *Restore

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

func (*Restore) DeepCopyInto added in v0.6.0

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 added in v0.6.0

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

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

type RestoreList

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

RestoreList is a list of Restores.

func (*RestoreList) DeepCopy added in v0.6.0

func (in *RestoreList) DeepCopy() *RestoreList

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

func (*RestoreList) DeepCopyInto added in v0.6.0

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 added in v0.6.0

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

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

type RestorePhase

type RestorePhase string

RestorePhase is a string representation of the lifecycle phase of an Ark restore

const (
	// RestorePhaseNew means the restore has been created but not
	// yet processed by the RestoreController
	RestorePhaseNew RestorePhase = "New"

	// RestorePhaseFailedValidation means the restore has failed
	// the controller's validations and therefore will not run.
	RestorePhaseFailedValidation RestorePhase = "FailedValidation"

	// RestorePhaseInProgress means the restore is currently executing.
	RestorePhaseInProgress RestorePhase = "InProgress"

	// RestorePhaseCompleted means the restore has finished executing.
	// Any relevant warnings or errors will be captured in the Status.
	RestorePhaseCompleted RestorePhase = "Completed"
)

type RestoreResult

type RestoreResult struct {
	// Ark is a slice of messages related to the operation of Ark
	// itself (for example, messages related to connecting to the
	// cloud, reading a backup file, etc.)
	Ark []string `json:"ark"`

	// Cluster is a slice of messages related to restoring cluster-
	// scoped resources.
	Cluster []string `json:"cluster"`

	// Namespaces is a map of namespace name to slice of messages
	// related to restoring namespace-scoped resources.
	Namespaces map[string][]string `json:"namespaces"`
}

RestoreResult is a collection of messages that were generated during execution of a restore. This will typically store either warning or error messages.

func (*RestoreResult) DeepCopy added in v0.6.0

func (in *RestoreResult) DeepCopy() *RestoreResult

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

func (*RestoreResult) DeepCopyInto added in v0.6.0

func (in *RestoreResult) DeepCopyInto(out *RestoreResult)

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

type RestoreSpec

type RestoreSpec struct {
	// BackupName is the unique name of the Ark backup to restore
	// from.
	BackupName string `json:"backupName"`

	// IncludedNamespaces is a slice of namespace names to include objects
	// from. If empty, all namespaces are included.
	IncludedNamespaces []string `json:"includedNamespaces"`

	// ExcludedNamespaces contains a list of namespaces that are not
	// included in the restore.
	ExcludedNamespaces []string `json:"excludedNamespaces"`

	// IncludedResources is a slice of resource names to include
	// in the restore. If empty, all resources in the backup are included.
	IncludedResources []string `json:"includedResources"`

	// ExcludedResources is a slice of resource names that are not
	// included in the restore.
	ExcludedResources []string `json:"excludedResources"`

	// NamespaceMapping is a map of source namespace names
	// to target namespace names to restore into. Any source
	// namespaces not included in the map will be restored into
	// namespaces of the same name.
	NamespaceMapping map[string]string `json:"namespaceMapping"`

	// LabelSelector is a metav1.LabelSelector to filter with
	// when restoring individual objects from the backup. If empty
	// or nil, all objects are included. Optional.
	LabelSelector *metav1.LabelSelector `json:"labelSelector"`

	// RestorePVs specifies whether to restore all included
	// PVs from snapshot (via the cloudprovider).
	RestorePVs *bool `json:"restorePVs"`

	// IncludeClusterResources specifies whether cluster-scoped resources
	// should be included for consideration in the restore. If null, defaults
	// to true.
	IncludeClusterResources *bool `json:"includeClusterResources"`
}

RestoreSpec defines the specification for an Ark restore.

func (*RestoreSpec) DeepCopy added in v0.6.0

func (in *RestoreSpec) DeepCopy() *RestoreSpec

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

func (*RestoreSpec) DeepCopyInto added in v0.6.0

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

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

type RestoreStatus

type RestoreStatus struct {
	// Phase is the current state of the Restore
	Phase RestorePhase `json:"phase"`

	// ValidationErrors is a slice of all validation errors (if
	// applicable)
	ValidationErrors []string `json:"validationErrors"`

	// Warnings is a count of all warning messages that were generated during
	// execution of the restore. The actual warnings are stored in object storage.
	Warnings int `json:"warnings"`

	// Errors is a count of all error messages that were generated during
	// execution of the restore. The actual errors are stored in object storage.
	Errors int `json:"errors"`
}

RestoreStatus captures the current status of an Ark restore

func (*RestoreStatus) DeepCopy added in v0.6.0

func (in *RestoreStatus) DeepCopy() *RestoreStatus

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

func (*RestoreStatus) DeepCopyInto added in v0.6.0

func (in *RestoreStatus) DeepCopyInto(out *RestoreStatus)

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

type Schedule

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

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

Schedule is an Ark resource that represents a pre-scheduled or periodic Backup that should be run.

func (*Schedule) DeepCopy added in v0.6.0

func (in *Schedule) DeepCopy() *Schedule

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

func (*Schedule) DeepCopyInto added in v0.6.0

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 added in v0.6.0

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

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

type ScheduleList

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

ScheduleList is a list of Schedules.

func (*ScheduleList) DeepCopy added in v0.6.0

func (in *ScheduleList) DeepCopy() *ScheduleList

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

func (*ScheduleList) DeepCopyInto added in v0.6.0

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 added in v0.6.0

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

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

type SchedulePhase

type SchedulePhase string

SchedulePhase is a string representation of the lifecycle phase of an Ark schedule

const (
	// SchedulePhaseNew means the schedule has been created but not
	// yet processed by the ScheduleController
	SchedulePhaseNew SchedulePhase = "New"

	// SchedulePhaseEnabled means the schedule has been validated and
	// will now be triggering backups according to the schedule spec.
	SchedulePhaseEnabled SchedulePhase = "Enabled"

	// SchedulePhaseFailedValidation means the schedule has failed
	// the controller's validations and therefore will not trigger backups.
	SchedulePhaseFailedValidation SchedulePhase = "FailedValidation"
)

type ScheduleSpec

type ScheduleSpec struct {
	// Template is the definition of the Backup to be run
	// on the provided schedule
	Template BackupSpec `json:"template"`

	// Schedule is a Cron expression defining when to run
	// the Backup.
	Schedule string `json:"schedule"`
}

ScheduleSpec defines the specification for an Ark schedule

func (*ScheduleSpec) DeepCopy added in v0.6.0

func (in *ScheduleSpec) DeepCopy() *ScheduleSpec

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

func (*ScheduleSpec) DeepCopyInto added in v0.6.0

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

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

type ScheduleStatus

type ScheduleStatus struct {
	// Phase is the current phase of the Schedule
	Phase SchedulePhase `json:"phase"`

	// LastBackup is the last time a Backup was run for this
	// Schedule schedule
	LastBackup metav1.Time `json:"lastBackup"`

	// ValidationErrors is a slice of all validation errors (if
	// applicable)
	ValidationErrors []string `json:"validationErrors"`
}

ScheduleStatus captures the current state of an Ark schedule

func (*ScheduleStatus) DeepCopy added in v0.6.0

func (in *ScheduleStatus) DeepCopy() *ScheduleStatus

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

func (*ScheduleStatus) DeepCopyInto added in v0.6.0

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

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

type VolumeBackupInfo

type VolumeBackupInfo struct {
	// SnapshotID is the ID of the snapshot taken in the cloud
	// provider API of this volume.
	SnapshotID string `json:"snapshotID"`

	// Type is the type of the disk/volume in the cloud provider
	// API.
	Type string `json:"type"`

	// AvailabilityZone is the where the volume is provisioned
	// in the cloud provider.
	AvailabilityZone string `json:"availabilityZone,omitempty"`

	// Iops is the optional value of provisioned IOPS for the
	// disk/volume in the cloud provider API.
	Iops *int64 `json:"iops,omitempty"`
}

VolumeBackupInfo captures the required information about a PersistentVolume at backup time to be able to restore it later.

func (*VolumeBackupInfo) DeepCopy added in v0.6.0

func (in *VolumeBackupInfo) DeepCopy() *VolumeBackupInfo

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

func (*VolumeBackupInfo) DeepCopyInto added in v0.6.0

func (in *VolumeBackupInfo) DeepCopyInto(out *VolumeBackupInfo)

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