Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the backup v1beta1 API group +kubebuilder:object:generate=true +groupName=cluster.open-cluster-management.io
Index ¶
Constants ¶
const ( // RestorePhaseStarted means the restore has been initialized and started RestorePhaseStarted = "Started" // RestorePhaseRunning means the restore is running and not yet finished RestorePhaseRunning = "Running" // RestorePhaseFinished means the restore finsihed RestorePhaseFinished = "Finished" // RestorePhaseFinishedWithErrors means the restore finsihed with 1+ errors restoring individual items RestorePhaseFinishedWithErrors = "FinishedWithErrors" // RestorePhaseError means the restore is in error phase and was unable to execute RestorePhaseError = "Error" // RestorePhaseUnknown means the restore is in unknown phase RestorePhaseUnknown = "Unknown" // RestorePhaseEnabled means the restore is enabled and will continue syncing with new backups RestorePhaseEnabled = "Enabled" )
const ( // clean up only resources created as a result of a previous restore operation CleanupTypeRestored = "CleanupRestored" // don't clean up any resources // this can be used on a new hub where there is no need to clean up any previously created data CleanupTypeNone = "None" // clean up all resources created by CRD in the acm backup included criteria, // even if these resources were not created by a previous restore // this option cleans up all resources not available with the current restored backup, // including user created resources // Use this option with caution as this could cleanup hub or user created resources CleanupTypeAll = "CleanupAll" )
const ( RestoreReasonNotStarted = "RestoreNotStarted" RestoreReasonStarted = "RestoreStarted" RestoreReasonRunning = "RestoreRunning" RestoreReasonFinished = "RestoreFinished" )
Valid Restore Reason
const (
// RestoreComplete means the restore runs to completion
RestoreComplete = "Complete"
)
Restore condition type
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "cluster.open-cluster-management.io", Version: "v1beta1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type BackupSchedule ¶
type BackupSchedule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BackupScheduleSpec `json:"spec,omitempty"` Status BackupScheduleStatus `json:"status,omitempty"` }
BackupSchedule is an ACM resource that you can use to schedule cluster backups at specified intervals. The backupschedule resource creates a set of schedule.velero.io resources to periodically generate backups for resources on your ACM hub cluster.
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) DeepCopyObject ¶
func (in *BackupSchedule) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupScheduleList ¶
type BackupScheduleList struct { metav1.TypeMeta ` json:",inline"` metav1.ListMeta ` json:"metadata,omitempty"` Items []BackupSchedule `json:"items"` }
BackupScheduleList contains a list of backup schedules
func (*BackupScheduleList) DeepCopy ¶
func (in *BackupScheduleList) DeepCopy() *BackupScheduleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupScheduleList.
func (*BackupScheduleList) DeepCopyInto ¶
func (in *BackupScheduleList) DeepCopyInto(out *BackupScheduleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BackupScheduleList) DeepCopyObject ¶
func (in *BackupScheduleList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BackupScheduleSpec ¶
type BackupScheduleSpec struct { // Schedule is a Cron expression defining when to run // the Velero Backup // +kubebuilder:validation:Required VeleroSchedule string `json:"veleroSchedule"` // TTL is a time.Duration-parseable string describing how long // the Velero Backup should be retained for. If not specified // the maximum default value set by velero is used - 720h // +kubebuilder:validation:Optional VeleroTTL metav1.Duration `json:"veleroTtl,omitempty"` // +kubebuilder:validation:Optional // Set this to true if you want to use the ManagedServiceAccount token to auto connect imported clusters on the // restored hub. // For this option to work, the user must first enable the managedserviceaccount component on the MultiClusterHub // If not defined, the value is set to false. // If this option is set to true, the backup controller will create ManagedServiceAccount // for each managed cluster connected on the primary hub using the import cluster option // see https://github.com/stolostron/managed-serviceaccount#what-is-managed-service-account // The token generated by the ManagedServiceAccount will have a TTL defaulted using the backup veleroTTL option // When set to false, all ManagedServiceAccounts created by the backup controller are being removed UseManagedServiceAccount bool `json:"useManagedServiceAccount,omitempty"` // +kubebuilder:validation:Optional // Used in combination with the UseManagedServiceAccount property // When UseManagedServiceAccount is set to true, defines the TTL for the generated token // If not defined and UseManagedServiceAccount is set to true, it defaults to a value using veleroTTL ManagedServiceAccountTTL metav1.Duration `json:"managedServiceAccountTTL,omitempty"` // +kubebuilder:validation:Optional // If not defined, the value is set to false. // Set this to true if you don't want to have backups created immediately after the velero schedules are created // Keep in mind that if you choose not to create ACM backups immediately after the schedules are generated // the validation policy will show a violation until backups are generated as defined by the cron job. // Also, if backups are not generated immediately, the BackupSchedule will always get into a BackupCollision state // during reconcile, if another hub had generated backups to the same storage location. Reconcile will find // the ACM backups with newer timestamp and generated by another hub so it will assume another hub currently // writes data to the same storage location. NoBackupOnStart bool `json:"noBackupOnStart,omitempty"` // +kubebuilder:validation:Optional // VolumeSnapshotLocations is a list containing names of VolumeSnapshotLocations associated with this backup. VolumeSnapshotLocations []string `json:"volumeSnapshotLocations,omitempty"` // +kubebuilder:validation:Optional // When set to true, all velero Schedules generated by this BackupSchedule will be removed. // Setting this option to false results in recreating the velero Schedules. // If not defined, the value is set to false. Paused bool `json:"paused,omitempty"` // +kubebuilder:validation:Optional // UseOwnerReferencesBackup specifies whether to use // OwnerReferences on backups created by this Schedule. UseOwnerReferencesInBackup bool `json:"useOwnerReferencesInBackup,omitempty"` // +kubebuilder:validation:Optional // SkipImmediately specifies whether to skip backup if schedule is due immediately // from `schedule.status.lastBackup` timestamp when schedule is unpaused or if schedule is new. // If true, backup will be skipped immediately when schedule is unpaused if it is due // based on .Status.LastBackupTimestamp or schedule is new, and will run at next schedule time. // If false, backup will not be skipped immediately when schedule is unpaused, but will run at next schedule time. // If not defined, the value is set to false. SkipImmediately bool `json:"skipImmediately,omitempty"` }
BackupScheduleSpec defines the desired state of BackupSchedule
func (*BackupScheduleSpec) DeepCopy ¶
func (in *BackupScheduleSpec) DeepCopy() *BackupScheduleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupScheduleSpec.
func (*BackupScheduleSpec) DeepCopyInto ¶
func (in *BackupScheduleSpec) DeepCopyInto(out *BackupScheduleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupScheduleStatus ¶
type BackupScheduleStatus struct { // Phase is the current phase of the schedule // +kubebuilder:validation:Optional Phase SchedulePhase `json:"phase"` // Message on the last operation // +kubebuilder:validation:Optional LastMessage string `json:"lastMessage"` // Velero Schedule for backing up remote clusters // +kubebuilder:validation:Optional VeleroScheduleManagedClusters *veleroapi.Schedule `json:"veleroScheduleManagedClusters,omitempty"` // Velero Schedule for backing up other resources // +kubebuilder:validation:Optional VeleroScheduleResources *veleroapi.Schedule `json:"veleroScheduleResources,omitempty"` // Velero Schedule for backing up credentials // +kubebuilder:validation:Optional VeleroScheduleCredentials *veleroapi.Schedule `json:"veleroScheduleCredentials,omitempty"` }
BackupScheduleStatus defines the observed state of BackupSchedule
func (*BackupScheduleStatus) DeepCopy ¶
func (in *BackupScheduleStatus) DeepCopy() *BackupScheduleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupScheduleStatus.
func (*BackupScheduleStatus) DeepCopyInto ¶
func (in *BackupScheduleStatus) DeepCopyInto(out *BackupScheduleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CleanupType ¶
type CleanupType string
type Restore ¶
type Restore struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec RestoreSpec `json:"spec,omitempty"` Status RestoreStatus `json:"status,omitempty"` }
Restore is an ACM resource that you can use to restore resources from a cluster backup to a target cluster. The restore resource has properties that you can use to restore only passive data or to restore managed cluster activation resources. Additionally, it has a property that you can use to periodically check for new backups and automatically restore them on the target cluster.
func (*Restore) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Restore.
func (*Restore) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Restore) DeepCopyObject ¶
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,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.
type RestoreSpec ¶
type RestoreSpec struct { // VeleroManagedClustersBackupName is the name of the velero back-up used to restore managed clusters. // Is required, valid values are latest, skip or backup_name // If value is set to latest, the latest backup is used, skip will not restore this type of backup // backup_name points to the name of the backup to be restored // +kubebuilder:validation:Required VeleroManagedClustersBackupName *string `json:"veleroManagedClustersBackupName"` // VeleroResourcesBackupName is the name of the velero back-up used to restore resources. // Is required, valid values are latest, skip or backup_name // If value is set to latest, the latest backup is used, skip will not restore this type of backup // backup_name points to the name of the backup to be restored // +kubebuilder:validation:Required VeleroResourcesBackupName *string `json:"veleroResourcesBackupName"` // VeleroCredentialsBackupName is the name of the velero back-up used to restore credentials. // Is required, valid values are latest, skip or backup_name // If value is set to latest, the latest backup is used, skip will not restore this type of backup // backup_name points to the name of the backup to be restored // +kubebuilder:validation:Required VeleroCredentialsBackupName *string `json:"veleroCredentialsBackupName"` // +kubebuilder:validation:Required // // 1. Use CleanupRestored if you want to delete all // resources created by a previous restore operation, before restoring the new data // 2. Use None if you don't want to clean up any resources before restoring the new data. // CleanupBeforeRestore CleanupType `json:"cleanupBeforeRestore"` // +kubebuilder:validation:Optional // Set this to true if you want to keep checking for new backups and restore if updates are available. // If not defined, the value is set to false. // For this option to work, you need to set VeleroResourcesBackupName and VeleroCredentialsBackupName // to latest and VeleroManagedClustersBackupName to skip SyncRestoreWithNewBackups bool `json:"syncRestoreWithNewBackups,omitempty"` // +kubebuilder:validation:Optional // Used in combination with the SyncRestoreWithNewBackups property // When SyncRestoreWithNewBackups is set to true, defines the duration for checking on new backups // If not defined and SyncRestoreWithNewBackups is set to true, it defaults to 30minutes RestoreSyncInterval metav1.Duration `json:"restoreSyncInterval,omitempty"` // velero option - RestorePVs specifies whether to restore all included // PVs from snapshot (via the cloudprovider). // +optional // +nullable RestorePVs *bool `json:"restorePVs,omitempty"` // velero option - RestoreStatus specifies which resources we should restore the status // field. If nil, no objects are included. Optional. // +optional // +nullable RestoreStatus *veleroapi.RestoreStatusSpec `json:"restoreStatus,omitempty"` // velero option - PreserveNodePorts specifies whether to restore old nodePorts from backup. // +optional // +nullable PreserveNodePorts *bool `json:"preserveNodePorts,omitempty"` // velero option - Hooks represent custom behaviors that should be executed during or post restore. // +optional Hooks veleroapi.RestoreHooks `json:"hooks,omitempty"` // velero option - IncludedNamespaces is a slice of namespace names to include objects // from. If empty, all namespaces are included. // +optional // +nullable IncludedNamespaces []string `json:"includedNamespaces,omitempty"` // velero option - ExcludedNamespaces contains a list of namespaces that are not // included in the restore. // +optional // +nullable ExcludedNamespaces []string `json:"excludedNamespaces,omitempty"` // velero option - IncludedResources is a slice of resource names to include // in the restore. If empty, all resources in the backup are included. // +optional // +nullable IncludedResources []string `json:"includedResources,omitempty"` // velero option - ExcludedResources is a slice of resource names that are not // included in the restore. // +optional // +nullable ExcludedResources []string `json:"excludedResources,omitempty"` // velero option - LabelSelector is a metav1.LabelSelector to filter with // when restoring individual objects from the backup. If empty // or nil, all objects are included. Optional. // +optional // +nullable LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"` // velero option - OrLabelSelectors is list of metav1.LabelSelector to filter with // when restoring individual objects from the backup. If multiple provided // they will be joined by the OR operator. LabelSelector as well as // OrLabelSelectors cannot co-exist in restore request, only one of them // can be used // +optional // +nullable OrLabelSelectors []*metav1.LabelSelector `json:"orLabelSelectors,omitempty"` // velero option - 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. // +optional NamespaceMapping map[string]string `json:"namespaceMapping,omitempty"` }
RestoreSpec defines the desired state of Restore
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 RestoreStatus ¶
type RestoreStatus struct { // +kubebuilder:validation:Optional VeleroManagedClustersRestoreName string `json:"veleroManagedClustersRestoreName,omitempty"` // +kubebuilder:validation:Optional VeleroResourcesRestoreName string `json:"veleroResourcesRestoreName,omitempty"` // +kubebuilder:validation:Optional VeleroGenericResourcesRestoreName string `json:"veleroGenericResourcesRestoreName,omitempty"` // +kubebuilder:validation:Optional VeleroCredentialsRestoreName string `json:"veleroCredentialsRestoreName,omitempty"` // Phase is the current phase of the restore // +kubebuilder:validation:Optional Phase RestorePhase `json:"phase"` // Message on the last operation // +kubebuilder:validation:Optional LastMessage string `json:"lastMessage"` // Messages contains any messages that were encountered during the restore process. // +optional // +nullable Messages []string `json:"messages,omitempty"` // CompletionTimestamp records the time the restore operation was completed. // +optional // +nullable CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty"` }
RestoreStatus defines the observed state of Restore
func (*RestoreStatus) DeepCopy ¶
func (in *RestoreStatus) DeepCopy() *RestoreStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreStatus.
func (*RestoreStatus) DeepCopyInto ¶
func (in *RestoreStatus) DeepCopyInto(out *RestoreStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SchedulePhase ¶
type SchedulePhase string
SchedulePhase shows phase of the 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" // SchedulePhaseFailed means the schedule has been processed by // the ScheduleController but there are some failures SchedulePhaseFailed SchedulePhase = "Failed" // SchedulePhaseUnknown means the schedule has been processed by // the ScheduleController but there are some unknown issues SchedulePhaseUnknown SchedulePhase = "Unknown" // another cluster pushes backups to the same storage location // resulting in a backup collision SchedulePhaseBackupCollision SchedulePhase = "BackupCollision" // SchedulePhasePaused means the BackupSchedule is paused, velero schedules are not running SchedulePhasePaused SchedulePhase = "Paused" )