Backup API reference
Packages:
backup.kurator.dev/v1alpha1
Package v1alpha1 contains API Schema definitions for the fleet v1alpha1 API group
Resource Types:Backup
Backup is the schema for the Backup’s API.
Field | Description | ||||||
---|---|---|---|---|---|---|---|
apiVersion string |
backup.kurator.dev/v1alpha1
|
||||||
kind string |
Backup
|
||||||
metadata Kubernetes meta/v1.ObjectMeta |
Refer to the Kubernetes API documentation for the fields of the
metadata field.
|
||||||
spec BackupSpec |
|
||||||
status BackupStatus |
BackupDetails
(Appears on: BackupStatus, MigrateStatus)
Field | Description |
---|---|
clusterName string |
(Optional)
ClusterName is the Name of the cluster where the backup is being performed. |
clusterKind string |
(Optional)
ClusterKind is the kind of ClusterName recorded in Kurator. |
backupNameInCluster string |
(Optional)
BackupNameInCluster is the name of the backup being performed within this cluster. This BackupNameInCluster is unique in Storage. |
backupStatusInCluster github.com/vmware-tanzu/velero/pkg/apis/velero/v1.BackupStatus |
(Optional)
BackupStatusInCluster is the current status of the backup performed within this cluster. |
BackupPolicy
(Appears on: BackupSpec)
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.
Field | Description |
---|---|
resourceFilter ResourceFilter |
(Optional)
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. |
ttl Kubernetes meta/v1.Duration |
(Optional)
TTL is a time.Duration-parseable string describing how long the Backup should be retained for. |
orderedResources map[string]string |
(Optional)
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:
|
BackupSpec
(Appears on: Backup)
Field | Description |
---|---|
schedule string |
(Optional)
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. |
destination Destination |
Destination indicates the clusters where backups should be performed. |
policy BackupPolicy |
(Optional)
Policy are the rules defining how backups should be performed. |
BackupStatus
(Appears on: Backup)
Field | Description |
---|---|
conditions Cluster API /v1beta1.Conditions |
(Optional)
Conditions represent the current state of the backup operation. |
phase string |
(Optional)
Phase represents the current phase of the backup operation. |
backupDetails []BackupDetails |
(Optional)
Details provides a detailed status for each backup in each cluster. |
Destination
(Appears on: BackupSpec, MigrateSpec, RestoreSpec)
Destination defines a target set of clusters, either through a fleet or by specifying them directly.
Field | Description |
---|---|
fleet string |
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. |
clusters []Kubernetes core/v1.ObjectReference |
(Optional)
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. |
Migrate
Migrate is the schema for the Migrate’s API.
Field | Description | ||||||
---|---|---|---|---|---|---|---|
metadata Kubernetes meta/v1.ObjectMeta |
Refer to the Kubernetes API documentation for the fields of the
metadata field.
|
||||||
spec MigrateSpec |
|
||||||
status MigrateStatus |
MigratePhase
(string
alias)
(Appears on: MigrateStatus)
MigratePhase is a string representation of the lifecycle phase of a Migrate instance
MigratePolicy
(Appears on: MigrateSpec)
Field | Description |
---|---|
resourceFilter ResourceFilter |
(Optional)
ResourceFilter specifies the resources to be included in the migration. If not set, all resources in source cluster will be migrated. |
orderedResources map[string]string |
(Optional)
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:
|
namespaceMapping map[string]string |
(Optional)
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. |
migrateStatus PreserveStatus |
(Optional)
MigrateStatus specifies which resources we should migrate the status field. If nil, no objects are included. Optional. |
preserveNodePorts bool |
(Optional)
PreserveNodePorts specifies whether to migrate old nodePorts from source cluster to target cluster. |
MigrateSpec
(Appears on: Migrate)
Field | Description |
---|---|
sourceCluster Destination |
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. |
targetCluster Destination |
TargetClusters represents the target clusters for migration. |
policy MigratePolicy |
Policy defines the rules for the migration. |
MigrateStatus
(Appears on: Migrate)
Field | Description |
---|---|
conditions Cluster API /v1beta1.Conditions |
(Optional)
Conditions represent the current state of the migration operation. |
phase MigratePhase |
(Optional)
Phase represents the current phase of the migration operation. |
sourceClusterStatus BackupDetails |
SourceClusterStatus provides a detailed status for backup in SourceCluster. |
targetClusterStatus []RestoreDetails |
TargetClusterStatus provides a detailed status for each restore in each TargetCluster. |
PreserveStatus
(Appears on: MigratePolicy, RestorePolicy)
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.
Field | Description |
---|---|
includedResources []string |
(Optional)
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. |
excludedResources []string |
(Optional)
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. |
ResourceFilter
(Appears on: BackupPolicy, MigratePolicy, RestorePolicy)
Note: partly copied from https://github.com/vmware-tanzu/velero/blob/v1.11.1/pkg/apis/velero/v1/backup_types.go
Field | Description |
---|---|
includedNamespaces []string |
(Optional)
IncludedNamespaces is a list of namespace names to include objects from. If empty, all namespaces are included. |
excludedNamespaces []string |
(Optional)
ExcludedNamespaces contains a list of namespaces that are not included in the backup. |
includedResources []string |
(Optional)
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. |
excludedResources []string |
(Optional)
ExcludedResources is a slice of resource names that are not included in the backup. Cannot work with IncludedClusterScopedResources, ExcludedClusterScopedResources, IncludedNamespaceScopedResources and ExcludedNamespaceScopedResources. |
includeClusterResources bool |
(Optional)
IncludeClusterResources specifies whether cluster-scoped resources should be included for consideration in the backup. Cannot work with IncludedClusterScopedResources, ExcludedClusterScopedResources, IncludedNamespaceScopedResources and ExcludedNamespaceScopedResources. |
includedClusterScopedResources []string |
(Optional)
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. |
excludedClusterScopedResources []string |
(Optional)
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. |
includedNamespaceScopedResources []string |
(Optional)
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. |
excludedNamespaceScopedResources []string |
(Optional)
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. |
labelSelector Kubernetes meta/v1.LabelSelector |
(Optional)
LabelSelector is a metav1.LabelSelector to filter with when adding individual objects to the backup. If empty or nil, all objects are included. Optional. |
orLabelSelectors []Kubernetes meta/v1.LabelSelector |
(Optional)
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. |
Restore
Restore is the schema for the Restore’s API.
Field | Description | ||||||
---|---|---|---|---|---|---|---|
metadata Kubernetes meta/v1.ObjectMeta |
Refer to the Kubernetes API documentation for the fields of the
metadata field.
|
||||||
spec RestoreSpec |
|
||||||
status RestoreStatus |
RestoreDetails
(Appears on: MigrateStatus, RestoreStatus)
Field | Description |
---|---|
clusterName string |
(Optional)
ClusterName is the Name of the cluster where the restore is being performed. |
clusterKind string |
(Optional)
ClusterKind is the kind of ClusterName recorded in Kurator. |
restoreNameInCluster string |
(Optional)
RestoreNameInCluster is the name of the restore being performed within this cluster. This RestoreNameInCluster is unique in Storage. |
restoreStatusInCluster github.com/vmware-tanzu/velero/pkg/apis/velero/v1.RestoreStatus |
(Optional)
RestoreStatusInCluster is the current status of the restore performed within this cluster. |
RestorePolicy
(Appears on: RestoreSpec)
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.
Field | Description |
---|---|
resourceFilter ResourceFilter |
(Optional)
ResourceFilter is the filter for the resources to be restored. If not set, all resources from the backup will be restored. |
namespaceMapping map[string]string |
(Optional)
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. |
preserveStatus PreserveStatus |
(Optional)
PreserveStatus specifies which resources we should restore the status field. If unset, no status will be restored. |
preserveNodePorts bool |
(Optional)
PreserveNodePorts specifies whether to restore old nodePorts from backup. If not specified, default to false. |
RestoreSpec
(Appears on: Restore)
Field | Description |
---|---|
backupName string |
BackupName specifies the backup on which this restore operation is based. |
destination Destination |
(Optional)
Destination indicates the clusters where restore should be performed. if not set, all the clusters from Backup.spec.destination will perform restore. |
policy RestorePolicy |
(Optional)
Policy defines the customization rules for the restore. If null, the backup will be fully restored using default settings. |
RestoreStatus
(Appears on: Restore)
Field | Description |
---|---|
conditions Cluster API /v1beta1.Conditions |
(Optional)
Conditions represent the current state of the restore operation. |
phase string |
(Optional)
Phase represents the current phase of the restore operation. |
restoreDetails []RestoreDetails |
(Optional)
Details provides a detailed status for each restore in each cluster. |
This page was automatically generated with gen-crd-api-reference-docs
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.