v1alpha1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the fleet v1alpha1 API group +kubebuilder:object:generate=true +groupName=backup.kurator.dev +k8s:deepcopy-gen=package

Index

Constants

View Source
const GroupName = "backup.kurator.dev"

GroupName specifies the group name used to register the objects.

View Source
const (
	// SourceReadyCondition reports on whether the resource of backup in source cluster is ready.
	SourceReadyCondition capiv1.ConditionType = "sourceReady"
)

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

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 is the schema for the Backup's 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.

type BackupDetails

type BackupDetails struct {
	// ClusterName is the Name of the cluster where the backup is being performed.
	// +optional
	ClusterName string `json:"clusterName,omitempty"`

	// ClusterKind is the kind of ClusterName recorded in Kurator.
	// +optional
	ClusterKind string `json:"clusterKind,omitempty"`

	// BackupNameInCluster is the name of the backup being performed within this cluster.
	// This BackupNameInCluster is unique in Storage.
	// +optional
	BackupNameInCluster string `json:"backupNameInCluster,omitempty"`

	// BackupStatusInCluster is the current status of the backup performed within this cluster.
	// +optional
	BackupStatusInCluster *velerov1.BackupStatus `json:"backupStatusInCluster,omitempty"`
}

func (*BackupDetails) DeepCopy

func (in *BackupDetails) DeepCopy() *BackupDetails

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

func (*BackupDetails) DeepCopyInto

func (in *BackupDetails) DeepCopyInto(out *BackupDetails)

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 Backup. +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

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 BackupPolicy

type BackupPolicy struct {
	// ResourceFilter specifies which resources should be included in the backup.
	// It acts as a selective criterion to determine which resources are relevant for backup.
	// If not set, the backup process will consider all resources. This filter helps in optimizing the backup process by excluding unnecessary data.
	// +optional
	ResourceFilter *ResourceFilter `json:"resourceFilter,omitempty"`

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

	// OrderedResources specifies the backup order of resources of specific Kind.
	// The map key is the resource name and value is a list of object names separated by commas.
	// Each resource name has format "namespace/objectname".  For cluster resources, simply use "objectname".
	// For example, if you have a specific order for pods, such as "pod1, pod2, pod3" with all belonging to the "ns1" namespace,
	// and a specific order for persistentvolumes, such as "pv4, pv8", you can use the orderedResources field in YAML format as shown below:
	// “`yaml
	// orderedResources:
	//  pods: "ns1/pod1, ns1/pod2, ns1/pod3"
	//  persistentvolumes: "pv4, pv8"
	// “`
	// +optional
	// +nullable
	OrderedResources map[string]string `json:"orderedResources,omitempty"`
}

Note: partly copied from https://github.com/vmware-tanzu/velero/blob/v1.11.1/pkg/apis/velero/v1/backup_types.go BackupPolicy defines the specification for a backup policy.

func (*BackupPolicy) DeepCopy

func (in *BackupPolicy) DeepCopy() *BackupPolicy

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

func (*BackupPolicy) DeepCopyInto

func (in *BackupPolicy) DeepCopyInto(out *BackupPolicy)

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

type BackupSpec

type BackupSpec struct {
	// Schedule defines when to run the Backup using a Cron expression.
	// A cron expression is a format used to specify the execution time of recurring tasks, consisting of multiple fields representing different time units.
	// ┌───────────── minute (0 - 59)
	// │ ┌───────────── hour (0 - 23)
	// │ │ ┌───────────── day of the month (1 - 31)
	// │ │ │ ┌───────────── month (1 - 12)
	// │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday;
	// │ │ │ │ │                                   7 is also Sunday on some systems)
	// │ │ │ │ │
	// │ │ │ │ │
	// * * * * *
	// For example, "30 * * * *" represents execution at the 30th minute of every hour, and "10 10,14 * * *" represents execution at 10:10 AM and 2:10 PM every day.
	// If not set, the backup will be executed only once.
	// +optional
	Schedule string `json:"schedule,omitempty"`

	// Destination indicates the clusters where backups should be performed.
	// +required
	Destination Destination `json:"destination"`

	// Policy are the rules defining how backups should be performed.
	// +optional
	Policy *BackupPolicy `json:"policy,omitempty"`
}

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 {
	// Conditions represent the current state of the backup operation.
	// +optional
	Conditions capiv1.Conditions `json:"conditions,omitempty"`

	// Phase represents the current phase of the backup operation.
	// +optional
	Phase string `json:"phase,omitempty"`

	// Details provides a detailed status for each backup in each cluster.
	// +optional
	Details []*BackupDetails `json:"backupDetails,omitempty"`
}

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 ClusterSelector

type ClusterSelector struct {
	// MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value".
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
	// +optional
	MatchLabels map[string]string `json:"matchLabels,omitempty"`
}

func (*ClusterSelector) DeepCopy

func (in *ClusterSelector) DeepCopy() *ClusterSelector

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

func (*ClusterSelector) DeepCopyInto

func (in *ClusterSelector) DeepCopyInto(out *ClusterSelector)

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

type Destination

type Destination struct {
	// Fleet represents the name of a fleet which determines a set of target clusters within the namespace.
	// This field is required to identify the context for cluster selection.
	// +required
	Fleet string `json:"fleet"`

	// Clusters allows users to specify a subset of clusters within the selected fleet for targeted operations.
	// If not set, it implies that the operation is targeted at all clusters within the specified fleet.
	// +optional
	Clusters []*corev1.ObjectReference `json:"clusters,omitempty"`
}

Destination defines a target set of clusters, either through a fleet or by specifying them directly.

func (*Destination) DeepCopy

func (in *Destination) DeepCopy() *Destination

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

func (*Destination) DeepCopyInto

func (in *Destination) DeepCopyInto(out *Destination)

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

type Migrate

type Migrate struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              MigrateSpec   `json:"spec,omitempty"`
	Status            MigrateStatus `json:"status,omitempty"`
}

Migrate is the schema for the Migrate's API.

func (*Migrate) DeepCopy

func (in *Migrate) DeepCopy() *Migrate

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

func (*Migrate) DeepCopyInto

func (in *Migrate) DeepCopyInto(out *Migrate)

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

func (*Migrate) DeepCopyObject

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

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

func (*Migrate) GetConditions

func (m *Migrate) GetConditions() capiv1.Conditions

func (*Migrate) SetConditions

func (m *Migrate) SetConditions(conditions capiv1.Conditions)

type MigrateList

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

MigrateList contains a list of Migrate. +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*MigrateList) DeepCopy

func (in *MigrateList) DeepCopy() *MigrateList

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

func (*MigrateList) DeepCopyInto

func (in *MigrateList) DeepCopyInto(out *MigrateList)

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

func (*MigrateList) DeepCopyObject

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

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

type MigratePhase

type MigratePhase string

MigratePhase is a string representation of the lifecycle phase of a Migrate instance +kubebuilder:validation:Enum=Pending;FailedValidation;BackupInProgress;RestoreInProgress;Completed;Failed

const (
	// MigratePhasePending means the migrate has been created but not
	// yet processed by the RestoreController
	MigratePhasePending MigratePhase = "Pending"

	// MigratePhaseFailedValidation means the migrate has failed
	// the controller's validations and therefore will not run.
	MigratePhaseFailedValidation MigratePhase = "FailedValidation"

	// MigratePhaseBackupInProgress indicates that the backup phase of the migrate is currently in progress.
	MigratePhaseBackupInProgress MigratePhase = "BackupInProgress"

	// MigratePhaseRestoreInProgress indicates that the restore phase of the migrate is currently in progress.
	MigratePhaseRestoreInProgress MigratePhase = "RestoreInProgress"

	// MigratePhaseCompleted means the migrate has run successfully
	// without errors.
	MigratePhaseCompleted MigratePhase = "Completed"

	// MigratePhaseFailed means the migrate was unable to execute.
	MigratePhaseFailed MigratePhase = "Failed"
)

type MigratePolicy

type MigratePolicy struct {
	// ResourceFilter specifies the resources to be included in the migration.
	// If not set, all resources in source cluster will be migrated.
	// +optional
	ResourceFilter *ResourceFilter `json:"resourceFilter,omitempty"`

	// OrderedResources specifies the backup order of resources of specific Kind.
	// The map key is the resource name and value is a list of object names separated by commas.
	// Each resource name has format "namespace/objectname".  For cluster resources, simply use "objectname".
	// For example, if you have a specific order for pods, such as "pod1, pod2, pod3" with all belonging to the "ns1" namespace,
	// and a specific order for persistentvolumes, such as "pv4, pv8", you can use the orderedResources field in YAML format as shown below:
	//
	// “`yaml
	// orderedResources:
	//  pods: "ns1/pod1, ns1/pod2, ns1/pod3"
	//  persistentvolumes: "pv4, pv8"
	// “`
	//
	// +optional
	// +nullable
	OrderedResources map[string]string `json:"orderedResources,omitempty"`

	// NamespaceMapping is a map of source namespace names to target namespace names to migrate into.
	// Any source namespaces not included in the map will be migrated into namespaces of the same name.
	// +optional
	NamespaceMapping map[string]string `json:"namespaceMapping,omitempty"`

	// MigrateStatus specifies which resources we should migrate the status field.
	// If nil, no objects are included. Optional.
	// +optional
	// +nullable
	MigrateStatus *PreserveStatus `json:"migrateStatus,omitempty"`

	// PreserveNodePorts specifies whether to migrate old nodePorts from source cluster to target cluster.
	// +optional
	// +nullable
	PreserveNodePorts *bool `json:"preserveNodePorts,omitempty"`
}

func (*MigratePolicy) DeepCopy

func (in *MigratePolicy) DeepCopy() *MigratePolicy

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

func (*MigratePolicy) DeepCopyInto

func (in *MigratePolicy) DeepCopyInto(out *MigratePolicy)

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

type MigrateSpec

type MigrateSpec struct {
	// SourceCluster represents the source cluster for migration.
	// The user needs to ensure that SourceCluster points to only ONE cluster.
	// Because the current migration only supports migrating from one SourceCluster to one or more TargetCluster.
	// +required
	SourceCluster Destination `json:"sourceCluster"`

	// TargetClusters represents the target clusters for migration.
	// +required
	TargetClusters Destination `json:"targetCluster"`

	// Policy defines the rules for the migration.
	Policy *MigratePolicy `json:"policy,omitempty"`
}

func (*MigrateSpec) DeepCopy

func (in *MigrateSpec) DeepCopy() *MigrateSpec

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

func (*MigrateSpec) DeepCopyInto

func (in *MigrateSpec) DeepCopyInto(out *MigrateSpec)

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

type MigrateStatus

type MigrateStatus struct {
	// Conditions represent the current state of the migration operation.
	// +optional
	Conditions capiv1.Conditions `json:"conditions,omitempty"`

	// Phase represents the current phase of the migration operation.
	// +optional
	Phase MigratePhase `json:"phase,omitempty"`

	// SourceClusterStatus provides a detailed status for backup in SourceCluster.
	SourceClusterStatus *BackupDetails `json:"sourceClusterStatus,omitempty"`

	// TargetClusterStatus provides a detailed status for each restore in each TargetCluster.
	TargetClustersStatus []*RestoreDetails `json:"targetClusterStatus,omitempty"`
}

func (*MigrateStatus) DeepCopy

func (in *MigrateStatus) DeepCopy() *MigrateStatus

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

func (*MigrateStatus) DeepCopyInto

func (in *MigrateStatus) DeepCopyInto(out *MigrateStatus)

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

type PreserveStatus

type PreserveStatus struct {
	// IncludedResources determines which resources will have their status restored.
	// By default, if this list is empty, it means the status for ALL resources will be restored.
	// For example:
	// - If you want to restore the status only for deployments and services, set:
	//   includedResources: ["deployments", "services"]
	// - If you leave it empty, the status for all resources will be restored.
	// Note: If a resource is listed in both IncludedResources and ExcludedResources, the exclusion takes precedence.
	// +optional
	// +nullable
	IncludedResources []string `json:"includedResources,omitempty"`

	// ExcludedResources lists out the resources that will NOT have their status restored.
	// By default, if this list is empty, it means the status for NO resources will be excluded from restoration.
	// For instance:
	// - If you want to prevent restoring the status for pods and configmaps, set:
	//   excludedResources: ["pods", "configmaps"]
	// - If you leave it empty, no resources are excluded, and all will have their status restored (unless specified otherwise in IncludedResources).
	// Note: Exclusions listed here take precedence over inclusions. So, if a resource is listed in both, its status will NOT be restored.
	// +optional
	// +nullable
	ExcludedResources []string `json:"excludedResources,omitempty"`
}

PreserveStatus specifies which resources we should restore the status field. The logic implemented is that everything in the included list except those items in the excluded list should be included. '*' in the includes list means "include everything", but it is not valid in the exclude list.

func (*PreserveStatus) DeepCopy

func (in *PreserveStatus) DeepCopy() *PreserveStatus

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

func (*PreserveStatus) DeepCopyInto

func (in *PreserveStatus) DeepCopyInto(out *PreserveStatus)

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

type ResourceFilter

type ResourceFilter struct {
	// IncludedNamespaces is a list of namespace names to include objects from.
	// If empty, all namespaces are included.
	// +optional
	// +nullable
	IncludedNamespaces []string `json:"includedNamespaces,omitempty"`

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

	// IncludedResources is a slice of API resource names to include in the backup.
	// For example, we can populate this string array with ["deployments", "configmaps","clusterroles","storageclasses"], then we will select all resources of type deployments and configmaps.
	// If empty, all API resources are included.
	// Cannot work with IncludedClusterScopedResources, ExcludedClusterScopedResources, IncludedNamespaceScopedResources and ExcludedNamespaceScopedResources.
	// +optional
	// +nullable
	IncludedResources []string `json:"includedResources,omitempty"`

	// ExcludedResources is a slice of resource names that are not included in the backup.
	// Cannot work with IncludedClusterScopedResources, ExcludedClusterScopedResources, IncludedNamespaceScopedResources and ExcludedNamespaceScopedResources.
	// +optional
	// +nullable
	ExcludedResources []string `json:"excludedResources,omitempty"`

	// IncludeClusterResources specifies whether cluster-scoped resources should be included for consideration in the backup.
	// Cannot work with IncludedClusterScopedResources, ExcludedClusterScopedResources, IncludedNamespaceScopedResources and ExcludedNamespaceScopedResources.
	// +optional
	// +nullable
	IncludeClusterResources *bool `json:"includeClusterResources,omitempty"`

	// IncludedClusterScopedResources is a slice of cluster-scoped resource type names to include in the backup.
	// For example, we can populate this string array with ["storageclasses", "clusterroles"], then we will select all resources of type storageclasses and clusterroles,
	// If set to "*", all cluster-scoped resource types are included.
	// The default value is empty, which means only related cluster-scoped resources are included.
	// Cannot work with IncludedResources, ExcludedResources and IncludeClusterResources.
	// +optional
	// +nullable
	IncludedClusterScopedResources []string `json:"includedClusterScopedResources,omitempty"`

	// ExcludedClusterScopedResources is a slice of cluster-scoped resource type names to exclude from the backup.
	// If set to "*", all cluster-scoped resource types are excluded. The default value is empty.
	// Cannot work with IncludedResources, ExcludedResources and IncludeClusterResources.
	// +optional
	// +nullable
	ExcludedClusterScopedResources []string `json:"excludedClusterScopedResources,omitempty"`

	// IncludedNamespaceScopedResources is a slice of namespace-scoped resource type names to include in the backup.
	// For example, we can populate this string array with ["deployments", "configmaps"], then we will select all resources of type deployments and configmaps,
	// The default value is "*".
	// Cannot work with IncludedResources, ExcludedResources and IncludeClusterResources.
	// +optional
	// +nullable
	IncludedNamespaceScopedResources []string `json:"includedNamespaceScopedResources,omitempty"`

	// ExcludedNamespaceScopedResources is a slice of namespace-scoped resource type names to exclude from the backup.
	// If set to "*", all namespace-scoped resource types are excluded. The default value is empty.
	// Cannot work with IncludedResources, ExcludedResources and IncludeClusterResources.
	// +optional
	// +nullable
	ExcludedNamespaceScopedResources []string `json:"excludedNamespaceScopedResources,omitempty"`

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

	// OrLabelSelectors is list of metav1.LabelSelector to filter with when adding individual objects to the backup.
	// If multiple provided they will be joined by the OR operator.
	// LabelSelector as well as OrLabelSelectors cannot co-exist in backup request, only one of them can be used.
	// +optional
	// +nullable
	OrLabelSelectors []*metav1.LabelSelector `json:"orLabelSelectors,omitempty"`
}

Note: partly copied from https://github.com/vmware-tanzu/velero/blob/v1.11.1/pkg/apis/velero/v1/backup_types.go

func (*ResourceFilter) DeepCopy

func (in *ResourceFilter) DeepCopy() *ResourceFilter

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

func (*ResourceFilter) DeepCopyInto

func (in *ResourceFilter) DeepCopyInto(out *ResourceFilter)

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,omitempty"`
	Spec              RestoreSpec   `json:"spec,omitempty"`
	Status            RestoreStatus `json:"status,omitempty"`
}

Restore is the schema for the Restore's 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.

type RestoreDetails

type RestoreDetails struct {
	// ClusterName is the Name of the cluster where the restore is being performed.
	// +optional
	ClusterName string `json:"clusterName,omitempty"`

	// ClusterKind is the kind of ClusterName recorded in Kurator.
	// +optional
	ClusterKind string `json:"clusterKind,omitempty"`

	// RestoreNameInCluster is the name of the restore being performed within this cluster.
	// This RestoreNameInCluster is unique in Storage.
	// +optional
	RestoreNameInCluster string `json:"restoreNameInCluster,omitempty"`

	// RestoreStatusInCluster is the current status of the restore performed within this cluster.
	// +optional
	RestoreStatusInCluster *velerov1.RestoreStatus `json:"restoreStatusInCluster,omitempty"`
}

func (*RestoreDetails) DeepCopy

func (in *RestoreDetails) DeepCopy() *RestoreDetails

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

func (*RestoreDetails) DeepCopyInto

func (in *RestoreDetails) DeepCopyInto(out *RestoreDetails)

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

type RestoreList

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

RestoreList contains a list of Restore. +kubebuilder:object:root=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

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 RestorePolicy

type RestorePolicy struct {
	// ResourceFilter is the filter for the resources to be restored.
	// If not set, all resources from the backup will be restored.
	// +optional
	ResourceFilter *ResourceFilter `json:"resourceFilter,omitempty"`

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

	// PreserveStatus specifies which resources we should restore the status field.
	// If unset, no status will be restored.
	// +optional
	// +nullable
	PreserveStatus *PreserveStatus `json:"preserveStatus,omitempty"`

	// PreserveNodePorts specifies whether to restore old nodePorts from backup.
	// If not specified, default to false.
	// +optional
	// +nullable
	PreserveNodePorts *bool `json:"preserveNodePorts,omitempty"`
}

Note: partly copied from https://github.com/vmware-tanzu/velero/blob/v1.11.1/pkg/apis/velero/v1/restore_types.go RestorePolicy defines the specification for a Velero restore.

func (*RestorePolicy) DeepCopy

func (in *RestorePolicy) DeepCopy() *RestorePolicy

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

func (*RestorePolicy) DeepCopyInto

func (in *RestorePolicy) DeepCopyInto(out *RestorePolicy)

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

type RestoreSpec

type RestoreSpec struct {
	// BackupName specifies the backup on which this restore operation is based.
	// +required
	BackupName string `json:"backupName"`

	// Destination indicates the clusters where restore should be performed.
	// if not set, all the clusters from Backup.spec.destination will perform restore.
	// +optional
	Destination *Destination `json:"destination,omitempty"`

	// Policy defines the customization rules for the restore.
	// If null, the backup will be fully restored using default settings.
	// +optional
	Policy *RestorePolicy `json:"policy,omitempty"`
}

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 {
	// Conditions represent the current state of the restore operation.
	// +optional
	Conditions capiv1.Conditions `json:"conditions,omitempty"`

	// Phase represents the current phase of the restore operation.
	// +optional
	Phase string `json:"phase,omitempty"`

	// Details provides a detailed status for each restore in each cluster.
	// +optional
	Details []*RestoreDetails `json:"restoreDetails,omitempty"`
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL