Backup API Reference
Packages:
dataprotection.kubeblocks.io/v1alpha1
Resource Types:ActionSet
ActionSet is the Schema for the actionsets API
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||
kind string | ActionSet | ||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||
spec ActionSetSpec |
| ||||||||||
status ActionSetStatus |
Backup
Backup is the Schema for the backups API.
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||
kind string | Backup | ||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||
spec BackupSpec |
| ||||||||||
status BackupStatus |
BackupPolicy
BackupPolicy is the Schema for the backuppolicies API.
Field | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||||
kind string | BackupPolicy | ||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||
spec BackupPolicySpec |
| ||||||||||||
status BackupPolicyStatus |
BackupRepo
BackupRepo is the Schema for the backuprepos API
Field | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||||
kind string | BackupRepo | ||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||
spec BackupRepoSpec |
| ||||||||||||
status BackupRepoStatus |
BackupSchedule
BackupSchedule is the Schema for the backupschedules API.
Field | Description | ||||||
---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||
kind string | BackupSchedule | ||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||
spec BackupScheduleSpec |
| ||||||
status BackupScheduleStatus |
Restore
Restore is the Schema for the restores API
Field | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | dataprotection.kubeblocks.io/v1alpha1 | ||||||||||||||||||
kind string | Restore | ||||||||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||||||||
spec RestoreSpec |
| ||||||||||||||||||
status RestoreStatus |
AccessMethod (string
alias)
(Appears on:BackupRepoSpec)
AccessMethod is an enum type that defines the access method of the backup repo.
Value | Description |
---|---|
"Mount" | AccessMethodMount means that the storage is mounted locally, so that remote files can be accessed just like a local file. |
"Tool" | AccessMethodTool means to access the storage with a command-line tool, which helps to transfer files between the storage and local. |
ActionErrorMode (string
alias)
(Appears on:ExecActionSpec, JobActionSpec)
ActionErrorMode defines how should treat an error from an action.
Value | Description |
---|---|
"Continue" | ActionErrorModeContinue means that an error from an action is acceptable. |
"Fail" | ActionErrorModeFail means that an error from an action is problematic. |
ActionPhase (string
alias)
(Appears on:ActionStatus)
Value | Description |
---|---|
"Completed" | ActionPhaseCompleted means the action has run successfully without errors. |
"Failed" | ActionPhaseFailed means the action ran but encountered an error that |
"New" | ActionPhaseNew means the action has been created but not yet processed by the BackupController. |
"Running" | ActionPhaseRunning means the action is currently executing. |
ActionSetSpec
(Appears on:ActionSet)
ActionSetSpec defines the desired state of ActionSet
Field | Description |
---|---|
backupType BackupType | backupType specifies the backup type, supported values:
|
env []Kubernetes core/v1.EnvVar | (Optional) List of environment variables to set in the container. |
envFrom []Kubernetes core/v1.EnvFromSource | (Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. |
backup BackupActionSpec | (Optional) backup specifies the backup action. |
restore RestoreActionSpec | (Optional) restore specifies the restore action. |
ActionSetStatus
(Appears on:ActionSet)
ActionSetStatus defines the observed state of ActionSet
Field | Description |
---|---|
phase Phase | (Optional) phase - in list of [Available,Unavailable] |
message string | (Optional) A human-readable message indicating details about why the ActionSet is in this phase. |
observedGeneration int64 | (Optional) generation number |
ActionSpec
(Appears on:BackupActionSpec, RestoreActionSpec)
ActionSpec defines an action that should be executed. Only one of the fields may be set.
Field | Description |
---|---|
exec ExecActionSpec | (Optional) exec specifies the action should be executed by the pod exec API in a container. |
job JobActionSpec | (Optional) job specifies the action should be executed by a Kubernetes Job. |
ActionStatus
(Appears on:BackupStatus)
Field | Description |
---|---|
name string | name is the name of the action. |
phase ActionPhase | (Optional) phase is the current state of the action. |
startTimestamp Kubernetes meta/v1.Time | (Optional) startTimestamp records the time an action was started. |
completionTimestamp Kubernetes meta/v1.Time | (Optional) completionTimestamp records the time an action was completed. |
failureReason string | (Optional) failureReason is an error that caused the backup to fail. |
actionType ActionType | (Optional) actionType is the type of the action. |
availableReplicas int32 | (Optional) availableReplicas available replicas for statefulSet action. |
objectRef Kubernetes core/v1.ObjectReference | (Optional) objectRef is the object reference for the action. |
totalSize string | (Optional) totalSize is the total size of backed up data size. A string with capacity units in the format of “1Gi”, “1Mi”, “1Ki”. |
timeRange BackupTimeRange | (Optional) timeRange records the time range of backed up data, for PITR, this is the time range of recoverable data. |
volumeSnapshots []VolumeSnapshotStatus | (Optional) volumeSnapshots records the volume snapshot status for the action. |
ActionType (string
alias)
(Appears on:ActionStatus)
Value | Description |
---|---|
"Job" | |
"" | |
"StatefulSet" |
BackupActionSpec
(Appears on:ActionSetSpec)
Field | Description |
---|---|
backupData BackupDataActionSpec | backupData specifies the backup data action. |
preBackup []ActionSpec | (Optional) preBackup specifies a hook that should be executed before the backup. |
postBackup []ActionSpec | (Optional) postBackup specifies a hook that should be executed after the backup. |
preDelete BaseJobActionSpec | (Optional) preDelete defines that custom deletion action which can be executed before executing the built-in deletion action. note that preDelete action job will ignore the env/envFrom. |
BackupDataActionSpec
(Appears on:BackupActionSpec)
BackupDataActionSpec defines how to back up data.
Field | Description |
---|---|
JobActionSpec JobActionSpec | (Members of |
syncProgress SyncProgress | (Optional) syncProgress specifies whether to sync the backup progress and its interval seconds. |
BackupDeletionPolicy (string
alias)
(Appears on:BackupSpec)
BackupDeletionPolicy describes a policy for end-of-life maintenance of backup content.
Value | Description |
---|---|
"Delete" | |
"Retain" |
BackupMethod
(Appears on:BackupPolicySpec, BackupStatus)
BackupMethod defines the backup method.
Field | Description |
---|---|
name string | the name of backup method. |
snapshotVolumes bool | (Optional) snapshotVolumes specifies whether to take snapshots of persistent volumes. if true, the BackupScript is not required, the controller will use the CSI volume snapshotter to create the snapshot. |
actionSetName string | (Optional) actionSetName refers to the ActionSet object that defines the backup actions. For volume snapshot backup, the actionSet is not required, the controller will use the CSI volume snapshotter to create the snapshot. |
targetVolumes TargetVolumeInfo | (Optional) targetVolumes specifies which volumes from the target should be mounted in the backup workload. |
env []Kubernetes core/v1.EnvVar | (Optional) env specifies the environment variables for the backup workload. |
runtimeSettings RuntimeSettings | (Optional) runtimeSettings specifies runtime settings for the backup workload container. |
target BackupTarget | (Optional) target specifies the target information to back up, it will override the global target policy. |
BackupPhase (string
alias)
(Appears on:BackupStatus)
BackupPhase is a string representation of the lifecycle phase of a Backup.
Value | Description |
---|---|
"Completed" | BackupPhaseCompleted means the backup has run successfully without errors. |
"Deleting" | BackupPhaseDeleting means the backup and all its associated data are being deleted. |
"Failed" | BackupPhaseFailed means the backup ran but encountered an error that prevented it from completing successfully. |
"New" | BackupPhaseNew means the backup has been created but not yet processed by the BackupController. |
"Running" | BackupPhaseRunning means the backup is currently executing. |
BackupPolicyPhase (string
alias)
BackupPolicyPhase defines phases for BackupPolicy.
Value | Description |
---|---|
"Available" | |
"Failed" |
BackupPolicySpec
(Appears on:BackupPolicy)
BackupPolicySpec defines the desired state of BackupPolicy
Field | Description |
---|---|
backupRepoName string | (Optional) backupRepoName is the name of BackupRepo and the backup data will be stored in this repository. If not set, will be stored in the default backup repository. |
pathPrefix string | (Optional) pathPrefix is the directory inside the backup repository to store the backup content. It is a relative to the path of the backup repository. |
backoffLimit int32 | (Optional) Specifies the number of retries before marking the backup failed. |
target BackupTarget | target specifies the target information to back up. |
backupMethods []BackupMethod | backupMethods defines the backup methods. |
useKopia bool | (Optional) useKopia specifies whether backup data should be stored in a Kopia repository. Data within the Kopia repository is both compressed and encrypted. Furthermore, data deduplication is implemented across various backups of the same cluster. This approach significantly reduces the actual storage usage, particularly for clusters with a low update frequency. NOTE: This feature should NOT be enabled when using KubeBlocks Community Edition, otherwise the backup will not be processed. |
BackupPolicyStatus
(Appears on:BackupPolicy)
BackupPolicyStatus defines the observed state of BackupPolicy
Field | Description |
---|---|
phase Phase | (Optional) phase - in list of [Available,Unavailable] |
message string | (Optional) A human-readable message indicating details about why the BackupPolicy is in this phase. |
observedGeneration int64 | (Optional) observedGeneration is the most recent generation observed for this BackupPolicy. It refers to the BackupPolicy’s generation, which is updated on mutation by the API Server. |
BackupRef
(Appears on:RestoreSpec)
BackupRef describes the backup name and namespace.
Field | Description |
---|---|
name string | backup name |
namespace string | backup namespace |
BackupRepoPhase (string
alias)
(Appears on:BackupRepoStatus)
BackupRepoPhase defines phases for BackupRepo CR.
Value | Description |
---|---|
"Deleting" | |
"Failed" | |
"PreChecking" | |
"Ready" |
BackupRepoSpec
(Appears on:BackupRepo)
BackupRepoSpec defines the desired state of BackupRepo
Field | Description |
---|---|
storageProviderRef string | The storage provider used by this backup repo. |
accessMethod AccessMethod | (Optional) Specifies the access method of the backup repo. |
volumeCapacity Kubernetes resource.Quantity | (Optional) The requested capacity for the PVC created by this backup repo. |
pvReclaimPolicy Kubernetes core/v1.PersistentVolumeReclaimPolicy | The reclaim policy for the PV created by this backup repo. |
config map[string]string | (Optional) Non-secret configurations for the storage provider. |
credential Kubernetes core/v1.SecretReference | (Optional) A secret that contains the credentials needed by the storage provider. |
BackupRepoStatus
(Appears on:BackupRepo)
BackupRepoStatus defines the observed state of BackupRepo
Field | Description |
---|---|
phase BackupRepoPhase | (Optional) Backup repo reconciliation phases. Valid values are PreChecking, Failed, Ready, Deleting. |
conditions []Kubernetes meta/v1.Condition | (Optional) conditions describes the current state of the repo. |
observedGeneration int64 | (Optional) observedGeneration is the latest generation observed by the controller. |
generatedCSIDriverSecret Kubernetes core/v1.SecretReference | (Optional) generatedCSIDriverSecret references the generated secret used by the CSI driver. |
generatedStorageClassName string | (Optional) generatedStorageClassName indicates the generated storage class name. |
backupPVCName string | (Optional) backupPVCName is the name of the PVC used to store backup data. |
toolConfigSecretName string | (Optional) toolConfigSecretName is the name of the secret containing the configuration for the access tool. |
isDefault bool | (Optional) isDefault indicates whether this backup repo is the default one. |
BackupSchedulePhase (string
alias)
(Appears on:BackupScheduleStatus)
BackupSchedulePhase defines the phase of BackupSchedule
Value | Description |
---|---|
"Available" | BackupSchedulePhaseAvailable means the backup schedule is available. |
"Failed" | BackupSchedulePhaseFailed means the backup schedule is failed. |
BackupScheduleSpec
(Appears on:BackupSchedule)
BackupScheduleSpec defines the desired state of BackupSchedule.
Field | Description |
---|---|
backupPolicyName string | Which backupPolicy is applied to perform this backup. |
startingDeadlineMinutes int64 | (Optional) startingDeadlineMinutes defines the deadline in minutes for starting the backup workload if it misses scheduled time for any reason. |
schedules []SchedulePolicy | schedules defines the list of backup schedules. |
BackupScheduleStatus
(Appears on:BackupSchedule)
BackupScheduleStatus defines the observed state of BackupSchedule.
Field | Description |
---|---|
phase BackupSchedulePhase | (Optional) phase describes the phase of the BackupSchedule. |
observedGeneration int64 | (Optional) observedGeneration is the most recent generation observed for this BackupSchedule. It refers to the BackupSchedule’s generation, which is updated on mutation by the API Server. |
failureReason string | (Optional) failureReason is an error that caused the backup to fail. |
schedules map[string]github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.ScheduleStatus | (Optional) schedules describes the status of each schedule. |
BackupSpec
(Appears on:Backup)
BackupSpec defines the desired state of Backup.
Field | Description |
---|---|
backupPolicyName string | Which backupPolicy is applied to perform this backup. |
backupMethod string | backupMethod specifies the backup method name that is defined in backupPolicy. |
deletionPolicy BackupDeletionPolicy | deletionPolicy determines whether the backup contents stored in backup repository should be deleted when the backup custom resource is deleted. Supported values are “Retain” and “Delete”. “Retain” means that the backup can not be deleted and remains in ‘Deleting’ phase. “Delete” means that the backup content and its physical snapshot on backup repository are deleted. |
retentionPeriod RetentionPeriod | (Optional) retentionPeriod determines a duration up to which the backup should be kept. Controller will remove all backups that are older than the RetentionPeriod. For example, RetentionPeriod of
You can also combine the above durations. For example: 30d12h30m. If not set, the backup will be kept forever. |
parentBackupName string | (Optional) parentBackupName determines the parent backup name for incremental or differential backup. |
BackupStatus
(Appears on:Backup)
BackupStatus defines the observed state of Backup.
Field | Description |
---|---|
formatVersion string | (Optional) formatVersion is the backup format version, including major, minor and patch version. |
phase BackupPhase | (Optional) phase is the current state of the Backup. |
expiration Kubernetes meta/v1.Time | (Optional) expiration is when this backup is eligible for garbage collection. ‘null’ means the Backup will NOT be cleaned except delete manual. |
startTimestamp Kubernetes meta/v1.Time | (Optional) startTimestamp records the time a backup was started. The server’s time is used for StartTimestamp. |
completionTimestamp Kubernetes meta/v1.Time | (Optional) completionTimestamp records the time a backup was completed. Completion time is recorded even on failed backups. The server’s time is used for CompletionTimestamp. |
duration Kubernetes meta/v1.Duration | (Optional) The duration time of backup execution. When converted to a string, the format is “1h2m0.5s”. |
totalSize string | (Optional) totalSize is the total size of backed up data size. A string with capacity units in the format of “1Gi”, “1Mi”, “1Ki”. If no capacity unit is specified, it is assumed to be in bytes. |
failureReason string | (Optional) failureReason is an error that caused the backup to fail. |
backupRepoName string | (Optional) backupRepoName is the name of the backup repository. |
path string | (Optional) path is the directory inside the backup repository where the backup data is stored. It is an absolute path in the backup repository. |
kopiaRepoPath string | (Optional) kopiaRepoPath records the path of the Kopia repository. |
persistentVolumeClaimName string | (Optional) persistentVolumeClaimName is the name of the persistent volume claim that is used to store the backup data. |
timeRange BackupTimeRange | (Optional) timeRange records the time range of backed up data, for PITR, this is the time range of recoverable data. |
target BackupTarget | (Optional) target records the target information for this backup. |
backupMethod BackupMethod | (Optional) backupMethod records the backup method information for this backup. Refer to BackupMethod for more details. |
actions []ActionStatus | (Optional) actions records the actions information for this backup. |
volumeSnapshots []VolumeSnapshotStatus | (Optional) volumeSnapshots records the volume snapshot status for the action. |
extras []string | extra records the extra info for the backup. |
BackupTarget
(Appears on:BackupMethod, BackupPolicySpec, BackupStatus)
Field | Description |
---|---|
podSelector PodSelector | podSelector is used to find the target pod. The volumes of the target pod will be backed up. |
connectionCredential ConnectionCredential | (Optional) connectionCredential specifies the connection credential to connect to the target database cluster. |
resources KubeResources | (Optional) resources specifies the kubernetes resources to back up. |
serviceAccountName string | serviceAccountName specifies the service account to run the backup workload. |
BackupTimeRange
(Appears on:ActionStatus, BackupStatus)
BackupTimeRange records the time range of backed up data, for PITR, this is the time range of recoverable data.
Field | Description |
---|---|
timeZone string | (Optional) time zone, only support zone offset, value range: “-12:59 ~ +13:00” |
start Kubernetes meta/v1.Time | (Optional) start records the start time of backup(Coordinated Universal Time, UTC). |
end Kubernetes meta/v1.Time | (Optional) end records the end time of backup(Coordinated Universal Time, UTC). |
BackupType (string
alias)
(Appears on:ActionSetSpec)
BackupType the backup type.
Value | Description |
---|---|
"Continuous" | |
"Differential" | |
"Full" | |
"Incremental" |
BaseJobActionSpec
(Appears on:BackupActionSpec, JobActionSpec)
BaseJobActionSpec is an action that creates a Kubernetes Job to execute a command.
Field | Description |
---|---|
image string | image specifies the image of backup container. |
command []string | command specifies the commands to back up the volume data. |
ConnectionCredential
(Appears on:BackupTarget, ReadyConfig)
ConnectionCredential specifies the connection credential to connect to the target database cluster.
Field | Description |
---|---|
secretName string | secretName refers to the Secret object that contains the connection credential. |
usernameKey string | usernameKey specifies the map key of the user in the connection credential secret. |
passwordKey string | passwordKey specifies the map key of the password in the connection credential secret. This password will be saved in the backup annotation for full backup. You can use the environment variable DP_ENCRYPTION_KEY to specify encryption key. |
hostKey string | hostKey specifies the map key of the host in the connection credential secret. |
portKey string | portKey specifies the map key of the port in the connection credential secret. |
ExecAction
(Appears on:ReadyConfig)
Field | Description |
---|---|
target ExecActionTarget | (Optional) execActionTarget defines the pods that need to be executed for the exec action. will execute on all pods that meet the conditions. |
ExecActionSpec
(Appears on:ActionSpec)
ExecActionSpec is an action that uses the pod exec API to execute a command in a container in a pod.
Field | Description |
---|---|
container string | (Optional) container is the container in the pod where the command should be executed. If not specified, the pod’s first container is used. |
command []string | Command is the command and arguments to execute. |
onError ActionErrorMode | (Optional) OnError specifies how should behave if it encounters an error executing this action. |
timeout Kubernetes meta/v1.Duration | (Optional) Timeout defines the maximum amount of time should wait for the hook to complete before considering the execution a failure. |
ExecActionTarget
(Appears on:ExecAction)
Field | Description |
---|---|
podSelector Kubernetes meta/v1.LabelSelector | kubectl exec in all selected pods. |
IncludeResource
(Appears on:RestoreKubeResources)
Field | Description |
---|---|
groupResource string | |
labelSelector Kubernetes meta/v1.LabelSelector | (Optional) select the specified resource for recovery by label. |
JobAction
(Appears on:ReadyConfig)
Field | Description |
---|---|
target JobActionTarget | jobActionTarget defines the pod that need to be executed for the job action. will select a pod that meets the conditions to execute. |
JobActionSpec
(Appears on:ActionSpec, BackupDataActionSpec, RestoreActionSpec)
JobActionSpec is an action that creates a Kubernetes Job to execute a command.
Field | Description |
---|---|
BaseJobActionSpec BaseJobActionSpec | (Members of |
runOnTargetPodNode bool | (Optional) runOnTargetPodNode specifies whether to run the job workload on the target pod node. If backup container should mount the target pod’s volumes, this field should be set to true. otherwise the target pod’s volumes will be ignored. |
onError ActionErrorMode | (Optional) OnError specifies how should behave if it encounters an error executing this action. |
JobActionTarget
(Appears on:JobAction)
Field | Description |
---|---|
podSelector Kubernetes meta/v1.LabelSelector | select one of the pods which selected by labels to build the job spec, such as mount required volumes and inject built-in env of the selected pod. |
volumeMounts []Kubernetes core/v1.VolumeMount | (Optional) volumeMounts defines which volumes of the selected pod need to be mounted on the restoring pod. |
KubeResources
(Appears on:BackupTarget)
KubeResources defines the kubernetes resources to back up.
Field | Description |
---|---|
selector Kubernetes meta/v1.LabelSelector | selector is a metav1.LabelSelector to filter the target kubernetes resources that need to be backed up. If not set, will do not back up any kubernetes resources. |
included []string | (Optional) included is a slice of namespaced-scoped resource type names to include in the kubernetes resources. The default value is “*”, which means all resource types will be included. |
excluded []string | (Optional) excluded is a slice of namespaced-scoped resource type names to exclude in the kubernetes resources. The default value is empty. |
Phase (string
alias)
(Appears on:ActionSetStatus, BackupPolicyStatus)
Phase defines the BackupPolicy and ActionSet CR .status.phase
Value | Description |
---|---|
"Available" | |
"Unavailable" |
PodSelectionStrategy (string
alias)
(Appears on:PodSelector)
PodSelectionStrategy specifies the strategy to select when multiple pods are selected for backup target
Value | Description |
---|---|
"All" | PodSelectionStrategyAll selects all pods that match the labelsSelector. |
"Any" | PodSelectionStrategyAny selects any one pod that match the labelsSelector. |
PodSelector
(Appears on:BackupTarget)
Field | Description |
---|---|
LabelSelector Kubernetes meta/v1.LabelSelector | (Members of labelsSelector is the label selector to filter the target pods. |
strategy PodSelectionStrategy | strategy specifies the strategy to select the target pod when multiple pods are selected. Valid values are:
|
PrepareDataConfig
(Appears on:RestoreSpec)
Field | Description |
---|---|
dataSourceRef VolumeConfig | (Optional) dataSourceRef describes the configuration when using |
volumeClaims []RestoreVolumeClaim | (Optional) volumeClaims defines the persistent Volume claims that need to be restored and mount them together into the restore job. these persistent Volume claims will be created if not exist. |
volumeClaimsTemplate RestoreVolumeClaimsTemplate | (Optional) volumeClaimsTemplate defines a template to build persistent Volume claims that need to be restored. these claims will be created in an orderly manner based on the number of replicas or reused if already exist. |
volumeClaimRestorePolicy VolumeClaimRestorePolicy | VolumeClaimRestorePolicy defines restore policy for persistent volume claim. Supported policies are as follows:
|
schedulingSpec SchedulingSpec | (Optional) scheduling spec for restoring pod. |
ReadinessProbe
(Appears on:ReadyConfig)
Field | Description |
---|---|
initialDelaySeconds int | (Optional) number of seconds after the container has started before probe is initiated. |
timeoutSeconds int | (Optional) number of seconds after which the probe times out. defaults to 30 second, minimum value is 1. |
periodSeconds int | (Optional) how often (in seconds) to perform the probe. defaults to 5 second, minimum value is 1. |
exec ReadinessProbeExecAction | exec specifies the action to take. |
ReadinessProbeExecAction
(Appears on:ReadinessProbe)
Field | Description |
---|---|
image string | refer to container image. |
command []string | refer to container command. |
ReadyConfig
(Appears on:RestoreSpec)
Field | Description |
---|---|
jobAction JobAction | (Optional) configuration for job action. |
execAction ExecAction | (Optional) configuration for exec action. |
connectionCredential ConnectionCredential | (Optional) credential template used for creating a connection credential |
readinessProbe ReadinessProbe | (Optional) periodic probe of the service readiness. controller will perform postReadyHooks of BackupScript.spec.restore after the service readiness when readinessProbe is configured. |
RestoreActionSpec
(Appears on:ActionSetSpec)
RestoreActionSpec defines how to restore data.
Field | Description |
---|---|
prepareData JobActionSpec | (Optional) prepareData specifies the action to prepare data. |
postReady []ActionSpec | (Optional) postReady specifies the action to execute after the data is ready. |
RestoreActionStatus (string
alias)
(Appears on:RestoreStatusAction)
RestoreActionStatus the status of restore action.
Value | Description |
---|---|
"Completed" | |
"Failed" | |
"Processing" |
RestoreKubeResources
(Appears on:RestoreSpec)
Field | Description |
---|---|
included []IncludeResource | will restore the specified resources |
RestorePhase (string
alias)
(Appears on:RestoreStatus)
RestorePhase The current phase. Valid values are Running, Completed, Failed, AsDataSource.
Value | Description |
---|---|
"AsDataSource" | |
"Completed" | |
"Failed" | |
"Running" |
RestoreSpec
(Appears on:Restore)
RestoreSpec defines the desired state of Restore
Field | Description |
---|---|
backup BackupRef | backup to be restored. The restore behavior based on the backup type:
|
restoreTime string | (Optional) restoreTime is the point in time for restoring. |
resources RestoreKubeResources | (Optional) restore the specified resources of kubernetes. |
prepareDataConfig PrepareDataConfig | (Optional) configuration for the action of “prepareData” phase, including the persistent volume claims that need to be restored and scheduling strategy of temporary recovery pod. |
serviceAccountName string | (Optional) service account name which needs for recovery pod. |
readyConfig ReadyConfig | (Optional) configuration for the action of “postReady” phase. |
env []Kubernetes core/v1.EnvVar | (Optional) list of environment variables to set in the container for restore and will be merged with the env of Backup and ActionSet. The priority of merging is as follows: |
containerResources Kubernetes core/v1.ResourceRequirements | (Optional) specified the required resources of restore job’s container. |
backoffLimit int32 | (Optional) Specifies the number of retries before marking the restore failed. |
RestoreStage (string
alias)
Value | Description |
---|---|
"postReady" | |
"prepareData" |
RestoreStatus
(Appears on:Restore)
RestoreStatus defines the observed state of Restore
Field | Description |
---|---|
phase RestorePhase | (Optional) |
startTimestamp Kubernetes meta/v1.Time | (Optional) Date/time when the restore started being processed. |
completionTimestamp Kubernetes meta/v1.Time | (Optional) Date/time when the restore finished being processed. |
duration Kubernetes meta/v1.Duration | (Optional) The duration time of restore execution. When converted to a string, the form is “1h2m0.5s”. |
actions RestoreStatusActions | (Optional) recorded all restore actions performed. |
conditions []Kubernetes meta/v1.Condition | (Optional) describe current state of restore API Resource, like warning. |
RestoreStatusAction
(Appears on:RestoreStatusActions)
Field | Description |
---|---|
name string | name describes the name of the recovery action based on the current backup. |
backupName string | which backup’s restore action belongs to. |
objectKey string | the execution object of the restore action. |
message string | (Optional) message is a human-readable message indicating details about the object condition. |
status RestoreActionStatus | the status of this action. |
startTime Kubernetes meta/v1.Time | (Optional) startTime is the start time for the restore job. |
endTime Kubernetes meta/v1.Time | (Optional) endTime is the completion time for the restore job. |
RestoreStatusActions
(Appears on:RestoreStatus)
Field | Description |
---|---|
prepareData []RestoreStatusAction | (Optional) record the actions for prepareData phase. |
postReady []RestoreStatusAction | (Optional) record the actions for postReady phase. |
RestoreVolumeClaim
(Appears on:PrepareDataConfig, RestoreVolumeClaimsTemplate)
Field | Description |
---|---|
metadata Kubernetes meta/v1.ObjectMeta | Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Refer to the Kubernetes API documentation for the fields of themetadata field. |
volumeClaimSpec Kubernetes core/v1.PersistentVolumeClaimSpec | volumeClaimSpec defines the desired characteristics of a persistent volume claim. |
VolumeConfig VolumeConfig | (Members of describing the source volume of the backup targetVolumes and how to mount path in the restoring container. |
RestoreVolumeClaimsTemplate
(Appears on:PrepareDataConfig)
Field | Description |
---|---|
templates []RestoreVolumeClaim | templates is a list of volume claims. |
replicas int32 | the replicas of persistent volume claim which need to be created and restored. the format of created claim name is |
startingIndex int32 | the starting index for the created persistent volume claim by according to template. minimum is 0. |
RetentionPeriod (string
alias)
(Appears on:BackupSpec, SchedulePolicy)
RetentionPeriod represents a duration in the format “1y2mo3w4d5h6m”, where y=year, mo=month, w=week, d=day, h=hour, m=minute.
RuntimeSettings
(Appears on:BackupMethod)
Field | Description |
---|---|
resources Kubernetes core/v1.ResourceRequirements | (Optional) resources specifies the resource required by container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ |
SchedulePhase (string
alias)
(Appears on:ScheduleStatus)
SchedulePhase defines the phase of schedule
Value | Description |
---|---|
"Failed" | |
"Running" |
SchedulePolicy
(Appears on:BackupScheduleSpec)
Field | Description |
---|---|
enabled bool | (Optional) enabled specifies whether the backup schedule is enabled or not. |
backupMethod string | backupMethod specifies the backup method name that is defined in backupPolicy. |
cronExpression string | the cron expression for schedule, the timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. |
retentionPeriod RetentionPeriod | (Optional) retentionPeriod determines a duration up to which the backup should be kept. controller will remove all backups that are older than the RetentionPeriod. For example, RetentionPeriod of
You can also combine the above durations. For example: 30d12h30m |
ScheduleStatus
(Appears on:BackupScheduleStatus)
ScheduleStatus defines the status of each schedule.
Field | Description |
---|---|
phase SchedulePhase | (Optional) phase describes the phase of the schedule. |
failureReason string | (Optional) failureReason is an error that caused the backup to fail. |
lastScheduleTime Kubernetes meta/v1.Time | (Optional) lastScheduleTime records the last time the backup was scheduled. |
lastSuccessfulTime Kubernetes meta/v1.Time | (Optional) lastSuccessfulTime records the last time the backup was successfully completed. |
SchedulingSpec
(Appears on:PrepareDataConfig)
Field | Description |
---|---|
tolerations []Kubernetes core/v1.Toleration | (Optional) the restoring pod’s tolerations. |
nodeSelector map[string]string | (Optional) nodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node’s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ |
nodeName string | (Optional) nodeName is a request to schedule this pod onto a specific node. If it is non-empty, the scheduler simply schedules this pod onto that node, assuming that it fits resource requirements. |
affinity Kubernetes core/v1.Affinity | (Optional) affinity is a group of affinity scheduling rules. refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ |
topologySpreadConstraints []Kubernetes core/v1.TopologySpreadConstraint | (Optional) topologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. refer to https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ |
schedulerName string | (Optional) If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. |
SyncProgress
(Appears on:BackupDataActionSpec)
Field | Description |
---|---|
enabled bool | (Optional) enabled specifies whether to sync the backup progress. If enabled, a sidecar container will be created to sync the backup progress to the Backup CR status. |
intervalSeconds int32 | (Optional) intervalSeconds specifies the interval seconds to sync the backup progress. |
TargetVolumeInfo
(Appears on:BackupMethod)
TargetVolumeInfo specifies the volumes and their mounts of the targeted application that should be mounted in backup workload.
Field | Description |
---|---|
volumes []string | (Optional) Volumes indicates the list of volumes of targeted application that should be mounted on the backup job. |
volumeMounts []Kubernetes core/v1.VolumeMount | (Optional) volumeMounts specifies the mount for the volumes specified in |
VolumeClaimRestorePolicy (string
alias)
(Appears on:PrepareDataConfig)
VolumeClaimRestorePolicy defines restore policy for persistent volume claim. Supported policies are as follows:
- Parallel: parallel recovery of persistent volume claim.
- Serial: restore the persistent volume claim in sequence, and wait until the previous persistent volume claim is restored before restoring a new one.
Value | Description |
---|---|
"Parallel" | |
"Serial" |
VolumeConfig
(Appears on:PrepareDataConfig, RestoreVolumeClaim)
Field | Description |
---|---|
volumeSource string | (Optional) volumeSource describes the volume will be restored from the specified volume of the backup targetVolumes. required if the backup uses volume snapshot. |
mountPath string | (Optional) mountPath path within the restoring container at which the volume should be mounted. |
VolumeSnapshotStatus
(Appears on:ActionStatus, BackupStatus)
Field | Description |
---|---|
name string | name is the name of the volume snapshot. |
contentName string | contentName is the name of the volume snapshot content. |
volumeName string | (Optional) volumeName is the name of the volume. |
size string | (Optional) size is the size of the volume snapshot. |
storage.kubeblocks.io/v1alpha1
Resource Types:StorageProvider
StorageProvider is the Schema for the storageproviders API StorageProvider describes how to provision PVCs for a specific storage system (e.g. S3, NFS, etc), by using the CSI driver.
Field | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
apiVersion string | storage.kubeblocks.io/v1alpha1 | ||||||||||||
kind string | StorageProvider | ||||||||||||
metadata Kubernetes meta/v1.ObjectMeta | Refer to the Kubernetes API documentation for the fields of themetadata field. | ||||||||||||
spec StorageProviderSpec |
| ||||||||||||
status StorageProviderStatus |
ParametersSchema
(Appears on:StorageProviderSpec)
ParametersSchema describes the parameters used by this StorageProvider.
Field | Description |
---|---|
openAPIV3Schema Kubernetes api extensions v1.JSONSchemaProps | (Optional) openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. |
credentialFields []string | (Optional) credentialFields are the fields used to generate the secret. |
StorageProviderPhase (string
alias)
(Appears on:StorageProviderStatus)
StorageProviderPhase defines phases of a storage provider.
Value | Description |
---|---|
"NotReady" | |
"Ready" |
StorageProviderSpec
(Appears on:StorageProvider)
StorageProviderSpec defines the desired state of StorageProvider
Field | Description |
---|---|
csiDriverName string | (Optional) The name of the CSI driver used by this StorageProvider. |
csiDriverSecretTemplate string | (Optional) A Go template for rendering a secret which will be used by the CSI driver. The template will be rendered with the following variables:
|
storageClassTemplate string | (Optional) A Go template for rendering a storage class which will be used by the CSI driver. The template will be rendered with the following variables:
|
persistentVolumeClaimTemplate string | (Optional) A Go template for rendering a PersistentVolumeClaim. The template will be rendered with the following variables:
|
datasafedConfigTemplate string | (Optional) A Go template for rendering a config used by the datasafed command. The template will be rendered with the following variables:
|
parametersSchema ParametersSchema | (Optional) The schema describes the parameters required by this StorageProvider, when rendering the templates. |
StorageProviderStatus
(Appears on:StorageProvider)
StorageProviderStatus defines the observed state of StorageProvider
Field | Description |
---|---|
phase StorageProviderPhase | Storage provider reconciliation phases. Valid values are NotReady, Ready. |
conditions []Kubernetes meta/v1.Condition | (Optional) Describes the current state of the storage provider. |
Generated with gen-crd-api-reference-docs