diff --git a/apis/dataprotection/v1alpha1/actionset_types.go b/apis/dataprotection/v1alpha1/actionset_types.go index 6d42ae41ac5..8952f9cb35b 100644 --- a/apis/dataprotection/v1alpha1/actionset_types.go +++ b/apis/dataprotection/v1alpha1/actionset_types.go @@ -23,54 +23,63 @@ import ( // ActionSetSpec defines the desired state of ActionSet type ActionSetSpec struct { - // backupType specifies the backup type, supported values: + // Specifies the backup type. Supported values include: // - // - `Full` means full backup. - // - `Incremental` means back up data that have changed since the last backup (full or incremental). - // - `Differential` means back up data that have changed since the last full backup. - // - `Continuous` will back up the transaction log continuously, the PITR (Point in Time Recovery) - // can be performed based on the continuous backup and full backup. + // - `Full` for a full backup. + // - `Incremental` back up data that have changed since the last backup (either full or incremental). + // - `Differential` back up data that has changed since the last full backup. + // - `Continuous` back up transaction logs continuously, such as MySQL binlog, PostgreSQL WAL, etc. + // + // Continuous backup is essential for implementing Point-in-Time Recovery (PITR). // // +kubebuilder:validation:Enum={Full,Incremental,Differential,Continuous} // +kubebuilder:default=Full // +kubebuilder:validation:Required BackupType BackupType `json:"backupType"` - // List of environment variables to set in the container. + // Specifies a list of environment variables to be set in the container. + // // +kubebuilder:pruning:PreserveUnknownFields // +optional Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"` - // 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. + // Specifies a list of sources to populate environment variables in the container. + // The keys within a source must be a C_IDENTIFIER. Any invalid keys will be + // reported as an event when the container starts. If a key exists in multiple + // sources, the value from the last source will take precedence. Any values + // defined by an Env with a duplicate key will take precedence. + // + // This field cannot be updated. + // // +kubebuilder:pruning:PreserveUnknownFields // +optional EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty"` - // backup specifies the backup action. + // Specifies the backup action. + // // +optional Backup *BackupActionSpec `json:"backup,omitempty"` - // restore specifies the restore action. + // Specifies the restore action. + // // +optional Restore *RestoreActionSpec `json:"restore,omitempty"` } // ActionSetStatus defines the observed state of ActionSet type ActionSetStatus struct { - // phase - in list of [Available,Unavailable] + // Indicates the phase of the ActionSet. This can be either 'Available' or 'Unavailable'. + // // +optional Phase Phase `json:"phase,omitempty"` - // A human-readable message indicating details about why the ActionSet is in this phase. + // Provides a human-readable explanation detailing the reason for the current phase of the ActionSet. + // // +optional Message string `json:"message,omitempty"` - // generation number + // Represents the generation number that has been observed by the controller. + // // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` } @@ -88,20 +97,24 @@ const ( ) type BackupActionSpec struct { - // backupData specifies the backup data action. + // Represents the action to be performed for backing up data. + // // +kubebuilder:validation:Required BackupData *BackupDataActionSpec `json:"backupData,omitempty"` - // preBackup specifies a hook that should be executed before the backup. + // Represents a set of actions that should be executed before the backup process begins. + // // +optional PreBackup []ActionSpec `json:"preBackup,omitempty"` - // postBackup specifies a hook that should be executed after the backup. + // Represents a set of actions that should be executed after the backup process has completed. + // // +optional PostBackup []ActionSpec `json:"postBackup,omitempty"` - // 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. + // Represents a custom deletion action that can be executed before the built-in deletion action. + // Note: The preDelete action job will ignore the env/envFrom. + // // +optional PreDeleteBackup *BaseJobActionSpec `json:"preDelete,omitempty"` } @@ -110,19 +123,23 @@ type BackupActionSpec struct { type BackupDataActionSpec struct { JobActionSpec `json:",inline"` - // syncProgress specifies whether to sync the backup progress and its interval seconds. + // Determines if the backup progress should be synchronized and the interval + // for synchronization in seconds. + // // +optional SyncProgress *SyncProgress `json:"syncProgress,omitempty"` } type SyncProgress struct { - // 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. + // Determines if the backup progress should be synchronized. If set to true, + // a sidecar container will be instantiated to synchronize the backup progress with the + // Backup Custom Resource (CR) status. + // // +optional Enabled *bool `json:"enabled,omitempty"` - // intervalSeconds specifies the interval seconds to sync the backup progress. + // Defines the interval in seconds for synchronizing the backup progress. + // // +optional // +kubebuilder:default=60 IntervalSeconds *int32 `json:"intervalSeconds,omitempty"` @@ -130,22 +147,26 @@ type SyncProgress struct { // RestoreActionSpec defines how to restore data. type RestoreActionSpec struct { - // prepareData specifies the action to prepare data. + // Specifies the action required to prepare data for restoration. + // // +optional PrepareData *JobActionSpec `json:"prepareData,omitempty"` - // postReady specifies the action to execute after the data is ready. + // Specifies the actions that should be executed after the data has been prepared and is ready for restoration. + // // +optional PostReady []ActionSpec `json:"postReady,omitempty"` } // ActionSpec defines an action that should be executed. Only one of the fields may be set. type ActionSpec struct { - // exec specifies the action should be executed by the pod exec API in a container. + // Specifies that the action should be executed using the pod's exec API within a container. + // // +optional Exec *ExecActionSpec `json:"exec,omitempty"` - // job specifies the action should be executed by a Kubernetes Job. + // Specifies that the action should be executed by a Kubernetes Job. + // // +optional Job *JobActionSpec `json:"job,omitempty"` } @@ -153,22 +174,26 @@ type ActionSpec struct { // ExecActionSpec is an action that uses the pod exec API to execute a command in a container // in a pod. type ExecActionSpec struct { - // container is the container in the pod where the command should be executed. - // If not specified, the pod's first container is used. + // Specifies the container within the pod where the command should be executed. + // If not specified, the first container in the pod is used by default. + // // +optional Container string `json:"container,omitempty"` - // Command is the command and arguments to execute. + // Defines the command and arguments to be executed. + // // +kubebuilder:validation:MinItems=1 Command []string `json:"command"` - // OnError specifies how should behave if it encounters an error executing this action. + // Indicates how to behave if an error is encountered during the execution of this action. + // // +optional // +kubebuilder:default=Fail OnError ActionErrorMode `json:"onError,omitempty"` - // Timeout defines the maximum amount of time should wait for the hook to complete before + // Specifies the maximum duration to wait for the hook to complete before // considering the execution a failure. + // // +optional Timeout metav1.Duration `json:"timeout,omitempty"` } @@ -177,16 +202,16 @@ type ExecActionSpec struct { type JobActionSpec struct { BaseJobActionSpec `json:",inline"` - // 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. + // Determines whether to run the job workload on the target pod node. + // If the backup container needs to mount the target pod's volumes, this field + // should be set to true. Otherwise, the target pod's volumes will be ignored. + // // +optional // +kubebuilder:default=false RunOnTargetPodNode *bool `json:"runOnTargetPodNode,omitempty"` - // OnError specifies how should behave if it encounters an error executing - // this action. + // Indicates how to behave if an error is encountered during the execution of this action. + // // +optional // +kubebuilder:default=Fail OnError ActionErrorMode `json:"onError,omitempty"` @@ -194,25 +219,28 @@ type JobActionSpec struct { // BaseJobActionSpec is an action that creates a Kubernetes Job to execute a command. type BaseJobActionSpec struct { - // image specifies the image of backup container. + // Specifies the image of the backup container. + // // +kubebuilder:validation:Required Image string `json:"image"` - // command specifies the commands to back up the volume data. + // Defines the commands to back up the volume data. + // // +kubebuilder:validation:Required Command []string `json:"command"` } -// ActionErrorMode defines how should treat an error from an action. -// TODO: now, only support Fail mode, will support Continue mode in the future. +// ActionErrorMode defines how to handle an error from an action. +// Currently, only the Fail mode is supported, but the Continue mode will be supported in the future. +// // +kubebuilder:validation:Enum=Continue;Fail type ActionErrorMode string const ( - // ActionErrorModeContinue means that an error from an action is acceptable. + // ActionErrorModeContinue signifies that an error from an action is acceptable and can be ignored. ActionErrorModeContinue ActionErrorMode = "Continue" - // ActionErrorModeFail means that an error from an action is problematic. + // ActionErrorModeFail signifies that an error from an action is problematic and should be treated as a failure. ActionErrorModeFail ActionErrorMode = "Fail" ) diff --git a/apis/dataprotection/v1alpha1/backup_types.go b/apis/dataprotection/v1alpha1/backup_types.go index f9a0c697205..144f0700c0d 100644 --- a/apis/dataprotection/v1alpha1/backup_types.go +++ b/apis/dataprotection/v1alpha1/backup_types.go @@ -23,34 +23,38 @@ import ( // BackupSpec defines the desired state of Backup. type BackupSpec struct { - // Which backupPolicy is applied to perform this backup. + // Specifies the backup policy to be applied for this backup. + // // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.backupPolicyName" BackupPolicyName string `json:"backupPolicyName"` - // backupMethod specifies the backup method name that is defined in backupPolicy. + // Specifies the backup method name that is defined in the backup policy. + // // +kubebuilder:validation:Required // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.backupMethod" BackupMethod string `json:"backupMethod"` - // deletionPolicy determines whether the backup contents stored in backup repository - // should be deleted when the backup custom resource is deleted. + // Determines whether the backup contents stored in the backup repository + // should be deleted when the backup custom resource(CR) is deleted. // Supported values are `Retain` and `Delete`. // // - `Retain` means that the backup content and its physical snapshot on backup repository are kept. // - `Delete` means that the backup content and its physical snapshot on backup repository are deleted. // // TODO: for the retain policy, we should support in the future for only deleting - // the backup custom objects but retaining the backup contents in backup repository. + // the backup CR but retaining the backup contents in backup repository. // The current implementation only prevent accidental deletion of backup data. + // // +kubebuilder:validation:Enum=Delete;Retain // +kubebuilder:validation:Required // +kubebuilder:default=Delete DeletionPolicy BackupDeletionPolicy `json:"deletionPolicy,omitempty"` - // retentionPeriod determines a duration up to which the backup should be kept. + // Determines a duration up to which the backup should be kept. // Controller will remove all backups that are older than the RetentionPeriod. + // If not set, the backup will be kept forever. // For example, RetentionPeriod of `30d` will keep only the backups of last 30 days. // Sample duration format: // @@ -61,13 +65,12 @@ type BackupSpec struct { // - minutes: 30m // // You can also combine the above durations. For example: 30d12h30m. - // If not set, the backup will be kept forever. // // +optional RetentionPeriod RetentionPeriod `json:"retentionPeriod,omitempty"` - // parentBackupName determines the parent backup name for incremental or - // differential backup. + // Determines the parent backup name for incremental or differential backup. + // // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.parentBackupName" ParentBackupName string `json:"parentBackupName,omitempty"` @@ -75,107 +78,128 @@ type BackupSpec struct { // BackupStatus defines the observed state of Backup. type BackupStatus struct { - // formatVersion is the backup format version, including major, minor and patch version. + // Specifies the backup format version, which includes major, minor, and patch versions. + // // +optional FormatVersion string `json:"formatVersion,omitempty"` - // phase is the current state of the Backup. + // Indicates the current state of the backup operation. + // // +optional Phase BackupPhase `json:"phase,omitempty"` - // expiration is when this backup is eligible for garbage collection. - // 'null' means the Backup will NOT be cleaned except delete manual. + // Indicates when this backup becomes eligible for garbage collection. + // A 'null' value implies that the backup will not be cleaned up unless manually deleted. + // // +optional Expiration *metav1.Time `json:"expiration,omitempty"` - // startTimestamp records the time a backup was started. - // The server's time is used for StartTimestamp. + // Records the time when the backup operation was started. + // The server's time is used for this timestamp. + // // +optional StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"` - // completionTimestamp records the time a backup was completed. - // Completion time is recorded even on failed backups. - // The server's time is used for CompletionTimestamp. + // Records the time when the backup operation was completed. + // This timestamp is recorded even if the backup operation fails. + // The server's time is used for this timestamp. + // // +optional CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty"` - // The duration time of backup execution. + // Records the duration of the backup operation. // When converted to a string, the format is "1h2m0.5s". + // // +optional Duration *metav1.Duration `json:"duration,omitempty"` - // totalSize is the total size of backed up data size. - // A string with capacity units in the format of "1Gi", "1Mi", "1Ki". + // Records the total size of the data backed up. + // The size is represented as 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. + // // +optional TotalSize string `json:"totalSize,omitempty"` - // failureReason is an error that caused the backup to fail. + // Any error that caused the backup operation to fail. + // // +optional FailureReason string `json:"failureReason,omitempty"` - // backupRepoName is the name of the backup repository. + // The name of the backup repository. + // // +optional BackupRepoName string `json:"backupRepoName,omitempty"` - // path is the directory inside the backup repository where the backup data is stored. - // It is an absolute path in the backup repository. + // The directory within the backup repository where the backup data is stored. + // This is an absolute path within the backup repository. + // // +optional Path string `json:"path,omitempty"` - // kopiaRepoPath records the path of the Kopia repository. + // Records the path of the Kopia repository. + // // +optional KopiaRepoPath string `json:"kopiaRepoPath,omitempty"` - // persistentVolumeClaimName is the name of the persistent volume claim that - // is used to store the backup data. + // Records the name of the persistent volume claim used to store the backup data. + // // +optional PersistentVolumeClaimName string `json:"persistentVolumeClaimName,omitempty"` - // timeRange records the time range of backed up data, for PITR, this is the - // time range of recoverable data. + // Records the time range of the data backed up. For Point-in-Time Recovery (PITR), + // this is the time range of recoverable data. + // // +optional TimeRange *BackupTimeRange `json:"timeRange,omitempty"` - // target records the target information for this backup. + // Records the target information for this backup. + // // +optional Target *BackupTarget `json:"target,omitempty"` - // backupMethod records the backup method information for this backup. + // Records the backup method information for this backup. // Refer to BackupMethod for more details. + // // +optional BackupMethod *BackupMethod `json:"backupMethod,omitempty"` - // actions records the actions information for this backup. + // Records the actions status for this backup. + // // +optional Actions []ActionStatus `json:"actions,omitempty"` - // volumeSnapshots records the volume snapshot status for the action. + // Records the volume snapshot status for the action. + // // +optional VolumeSnapshots []VolumeSnapshotStatus `json:"volumeSnapshots,omitempty"` - // extra records the extra info for the backup. + // Records any additional information for the backup. + // + // +optional Extras []map[string]string `json:"extras,omitempty"` } // BackupTimeRange records the time range of backed up data, for PITR, this is the // time range of recoverable data. type BackupTimeRange struct { - // time zone, only support zone offset, value range: "-12:59 ~ +13:00" + // time zone, supports only zone offset, with a value range of "-12:59 ~ +13:00". + // // +kubebuilder:validation:Pattern:=`^(\+|\-)(0[0-9]|1[0-3]):([0-5][0-9])$` // +optional TimeZone string `json:"timeZone,omitempty"` - // start records the start time of backup(Coordinated Universal Time, UTC). + // Records the start time of the backup, in Coordinated Universal Time (UTC). + // // +optional Start *metav1.Time `json:"start,omitempty"` - // end records the end time of backup(Coordinated Universal Time, UTC). + // Records the end time of the backup, in Coordinated Universal Time (UTC). + // // +optional End *metav1.Time `json:"end,omitempty"` } -// BackupDeletionPolicy describes a policy for end-of-life maintenance of backup content. +// BackupDeletionPolicy describes the policy for end-of-life maintenance of backup content. // +enum // +kubebuilder:validation:Enum={Delete,Retain} type BackupDeletionPolicy string @@ -185,7 +209,7 @@ const ( BackupDeletionPolicyRetain BackupDeletionPolicy = "Retain" ) -// BackupPhase is a string representation of the lifecycle phase of a Backup. +// BackupPhase describes the lifecycle phase of a Backup. // +enum // +kubebuilder:validation:Enum={New,InProgress,Running,Completed,Failed,Deleting} type BackupPhase string @@ -210,64 +234,83 @@ const ( ) type ActionStatus struct { - // name is the name of the action. + // The name of the action. + // + // +optional Name string `json:"name,omitempty"` - // phase is the current state of the action. + // The current phase of the action. + // // +optional Phase ActionPhase `json:"phase,omitempty"` - // startTimestamp records the time an action was started. + // Records the time an action was started. + // // +optional StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"` - // completionTimestamp records the time an action was completed. + // Records the time an action was completed. + // // +optional CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty"` - // failureReason is an error that caused the backup to fail. + // An error that caused the action to fail. + // // +optional FailureReason string `json:"failureReason,omitempty"` - // actionType is the type of the action. + // The type of the action. + // // +optional ActionType ActionType `json:"actionType,omitempty"` - // availableReplicas available replicas for statefulSet action. + // Available replicas for statefulSet action. + // // +optional AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - // objectRef is the object reference for the action. + // The object reference for the action. + // // +optional ObjectRef *corev1.ObjectReference `json:"objectRef,omitempty"` - // totalSize is the total size of backed up data size. + // 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. + // // +optional TotalSize string `json:"totalSize,omitempty"` - // timeRange records the time range of backed up data, for PITR, this is the - // time range of recoverable data. + // Records the time range of backed up data, for PITR, this is the time + // range of recoverable data. + // // +optional TimeRange *BackupTimeRange `json:"timeRange,omitempty"` - // volumeSnapshots records the volume snapshot status for the action. + // Records the volume snapshot status for the action. + // // +optional VolumeSnapshots []VolumeSnapshotStatus `json:"volumeSnapshots,omitempty"` } type VolumeSnapshotStatus struct { - // name is the name of the volume snapshot. + // The name of the volume snapshot. + // + // +optional Name string `json:"name,omitempty"` - // contentName is the name of the volume snapshot content. + // The name of the volume snapshot content. + // + // +optional ContentName string `json:"contentName,omitempty"` - // volumeName is the name of the volume. + // The name of the volume. + // // +optional VolumeName string `json:"volumeName,omitempty"` - // size is the size of the volume snapshot. + // The size of the volume snapshot. + // // +optional Size string `json:"size,omitempty"` } diff --git a/apis/dataprotection/v1alpha1/backuppolicy_types.go b/apis/dataprotection/v1alpha1/backuppolicy_types.go index 5ac6b66d76b..40589fe0974 100644 --- a/apis/dataprotection/v1alpha1/backuppolicy_types.go +++ b/apis/dataprotection/v1alpha1/backuppolicy_types.go @@ -23,41 +23,45 @@ import ( // BackupPolicySpec defines the desired state of BackupPolicy type BackupPolicySpec struct { - // 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. + // Specifies the name of BackupRepo where the backup data will be stored. + // If not set, data will be stored in the default backup repository. + // // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` // +optional BackupRepoName *string `json:"backupRepoName,omitempty"` - // pathPrefix is the directory inside the backup repository to store the backup content. - // It is a relative to the path of the backup repository. + // Specifies the directory inside the backup repository to store the backup. + // This path is relative to the path of the backup repository. + // // +optional PathPrefix string `json:"pathPrefix,omitempty"` - // Specifies the number of retries before marking the backup failed. + // Specifies the number of retries before marking the backup as failed. + // // +optional // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=10 BackoffLimit *int32 `json:"backoffLimit,omitempty"` - // target specifies the target information to back up. + // Specifies the target information to back up, such as the target pod, the + // cluster connection credential. + // // +kubebuilder:validation:Required Target *BackupTarget `json:"target"` - // backupMethods defines the backup methods. + // Defines the backup methods. + // // +kubebuilder:validation:Required BackupMethods []BackupMethod `json:"backupMethods"` - // useKopia specifies whether backup data should be stored in a Kopia repository. + // 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. + // 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. + // NOTE: This feature should NOT be enabled when using KubeBlocks Community Edition, otherwise the backup will not be processed. // // +optional // +kubebuilder:default=false @@ -65,21 +69,23 @@ type BackupPolicySpec struct { } type BackupTarget struct { - // podSelector is used to find the target pod. The volumes of the target pod - // will be backed up. + // Used to find the target pod. The volumes of the target pod will be backed up. + // // +kube:validation:Required PodSelector *PodSelector `json:"podSelector,omitempty"` - // connectionCredential specifies the connection credential to connect to the - // target database cluster. + // Specifies the connection credential to connect to the target database cluster. + // // +optional ConnectionCredential *ConnectionCredential `json:"connectionCredential,omitempty"` - // resources specifies the kubernetes resources to back up. + // Specifies the kubernetes resources to back up. + // // +optional Resources *KubeResources `json:"resources,omitempty"` - // serviceAccountName specifies the service account to run the backup workload. + // Specifies the service account to run the backup workload. + // // +kubebuilder:validation:Required ServiceAccountName string `json:"serviceAccountName,omitempty"` } @@ -88,12 +94,11 @@ type PodSelector struct { // labelsSelector is the label selector to filter the target pods. *metav1.LabelSelector `json:",inline"` - // strategy specifies the strategy to select the target pod when multiple pods - // are selected. - // Valid values are: + // Specifies the strategy to select the target pod when multiple pods are selected. + // Valid values are: Any: select any one pod that match the labelsSelector. // - // - Any: select any one pod that match the labelsSelector. - // - All: select all pods that match the labelsSelector. + // - `Any`: select any one pod that match the labelsSelector. + // - `All`: select all pods that match the labelsSelector. // // +kubebuilder:default=Any Strategy PodSelectionStrategy `json:"strategy,omitempty"` @@ -116,84 +121,97 @@ const ( // ConnectionCredential specifies the connection credential to connect to the // target database cluster. type ConnectionCredential struct { - // secretName refers to the Secret object that contains the connection credential. + // Refers to the Secret object that contains the connection credential. + // // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` SecretName string `json:"secretName"` - // usernameKey specifies the map key of the user in the connection credential secret. + // Specifies the map key of the user in the connection credential secret. + // // +kubebuilder:default=username UsernameKey string `json:"usernameKey,omitempty"` - // passwordKey specifies the map key of the password in the connection credential secret. + // 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. + // // +kubebuilder:default=password PasswordKey string `json:"passwordKey,omitempty"` - // hostKey specifies the map key of the host in the connection credential secret. + // Specifies the map key of the host in the connection credential secret. + // + // +optional HostKey string `json:"hostKey,omitempty"` - // portKey specifies the map key of the port in the connection credential secret. + // Specifies the map key of the port in the connection credential secret. + // + // +optional PortKey string `json:"portKey,omitempty"` } // KubeResources defines the kubernetes resources to back up. type KubeResources struct { - // 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. + // 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. + // // +kube:validation:Required Selector *metav1.LabelSelector `json:"selector,omitempty"` // 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. + // The default value is empty. + // // +optional - // +kubebuilder:default={"*"} Included []string `json:"included,omitempty"` // excluded is a slice of namespaced-scoped resource type names to exclude in // the kubernetes resources. // The default value is empty. + // // +optional Excluded []string `json:"excluded,omitempty"` } // BackupMethod defines the backup method. type BackupMethod struct { - // the name of backup method. + // The name of backup method. + // // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` Name string `json:"name"` - // 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. + // Specifies whether to take snapshots of persistent volumes. If true, + // the ActionSetName is not required, the controller will use the CSI volume + // snapshotter to create the snapshot. + // // +optional // +kubebuilder:default=false SnapshotVolumes *bool `json:"snapshotVolumes,omitempty"` - // actionSetName refers to the ActionSet object that defines the backup actions. + // 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. // +optional ActionSetName string `json:"actionSetName,omitempty"` - // targetVolumes specifies which volumes from the target should be mounted in - // the backup workload. + // Specifies which volumes from the target should be mounted in the backup workload. + // // +optional TargetVolumes *TargetVolumeInfo `json:"targetVolumes,omitempty"` - // env specifies the environment variables for the backup workload. + // Specifies the environment variables for the backup workload. + // // +optional Env []corev1.EnvVar `json:"env,omitempty"` - // runtimeSettings specifies runtime settings for the backup workload container. + // Specifies runtime settings for the backup workload container. + // // +optional RuntimeSettings *RuntimeSettings `json:"runtimeSettings,omitempty"` - // target specifies the target information to back up, it will override the global target policy. + // Specifies the target information to back up, it will override the target in backup policy. + // // +optional Target *BackupTarget `json:"target,omitempty"` } @@ -201,37 +219,42 @@ type BackupMethod struct { // TargetVolumeInfo specifies the volumes and their mounts of the targeted application // that should be mounted in backup workload. type TargetVolumeInfo struct { - // Volumes indicates the list of volumes of targeted application that should - // be mounted on the backup job. + // Specifies the list of volumes of targeted application that should be mounted + // on the backup workload. + // // +optional Volumes []string `json:"volumes,omitempty"` - // volumeMounts specifies the mount for the volumes specified in `Volumes` section. + // Specifies the mount for the volumes specified in `volumes` section. + // // +optional VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` } type RuntimeSettings struct { - // resources specifies the resource required by container. + // Specifies the resource required by container. // More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ + // // +optional Resources corev1.ResourceRequirements `json:"resources,omitempty"` } // BackupPolicyStatus defines the observed state of BackupPolicy type BackupPolicyStatus struct { - // phase - in list of [Available,Unavailable] + // Phase - in list of [Available,Unavailable] + // // +optional Phase Phase `json:"phase,omitempty"` - // A human-readable message indicating details about why the BackupPolicy is - // in this phase. + // A human-readable message indicating details about why the BackupPolicy + // is in this phase. + // // +optional Message string `json:"message,omitempty"` - // 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. + // 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. + // // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` } diff --git a/apis/dataprotection/v1alpha1/backupschedule_types.go b/apis/dataprotection/v1alpha1/backupschedule_types.go index 3a01039cc89..37ff4c1c215 100644 --- a/apis/dataprotection/v1alpha1/backupschedule_types.go +++ b/apis/dataprotection/v1alpha1/backupschedule_types.go @@ -22,40 +22,46 @@ import ( // BackupScheduleSpec defines the desired state of BackupSchedule. type BackupScheduleSpec struct { - // Which backupPolicy is applied to perform this backup. + // Specifies the backupPolicy to be applied for the `schedules`. + // // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern:=`^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$` BackupPolicyName string `json:"backupPolicyName"` - // startingDeadlineMinutes defines the deadline in minutes for starting the - // backup workload if it misses scheduled time for any reason. + // Defines the deadline in minutes for starting the backup workload if it + // misses its scheduled time for any reason. + // // +optional // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=1440 StartingDeadlineMinutes *int64 `json:"startingDeadlineMinutes,omitempty"` - // schedules defines the list of backup schedules. + // Defines the list of backup schedules. + // // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 Schedules []SchedulePolicy `json:"schedules"` } type SchedulePolicy struct { - // enabled specifies whether the backup schedule is enabled or not. + // Specifies whether the backup schedule is enabled or not. + // // +optional Enabled *bool `json:"enabled,omitempty"` - // backupMethod specifies the backup method name that is defined in backupPolicy. + // Specifies the backup method name that is defined in backupPolicy. + // // +kubebuilder:validation:Required BackupMethod string `json:"backupMethod"` - // the cron expression for schedule, the timezone is in UTC. + // Specifies the cron expression for the schedule. The timezone is in UTC. // see https://en.wikipedia.org/wiki/Cron. + // // +kubebuilder:validation:Required CronExpression string `json:"cronExpression"` - // retentionPeriod determines a duration up to which the backup should be kept. - // controller will remove all backups that are older than the RetentionPeriod. + // Determines the duration for which the backup should be kept. + // KubeBlocks will remove all backups that are older than the RetentionPeriod. // For example, RetentionPeriod of `30d` will keep only the backups of last 30 days. // Sample duration format: // @@ -74,21 +80,25 @@ type SchedulePolicy struct { // BackupScheduleStatus defines the observed state of BackupSchedule. type BackupScheduleStatus struct { - // phase describes the phase of the BackupSchedule. + // Describes the phase of the BackupSchedule. + // // +optional Phase BackupSchedulePhase `json:"phase,omitempty"` - // 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. + // Represents the most recent generation observed for this BackupSchedule. + // It refers to the BackupSchedule's generation, which is updated on mutation + // by the API Server. + // // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // failureReason is an error that caused the backup to fail. + // Represents an error that caused the backup to fail. + // // +optional FailureReason string `json:"failureReason,omitempty"` - // schedules describes the status of each schedule. + // Describes the status of each schedule. + // // +optional Schedules map[string]ScheduleStatus `json:"schedules,omitempty"` } @@ -97,33 +107,37 @@ type BackupScheduleStatus struct { type BackupSchedulePhase string const ( - // BackupSchedulePhaseAvailable means the backup schedule is available. + // BackupSchedulePhaseAvailable indicates the backup schedule is available. BackupSchedulePhaseAvailable BackupSchedulePhase = "Available" - // BackupSchedulePhaseFailed means the backup schedule is failed. + // BackupSchedulePhaseFailed indicates the backup schedule has failed. BackupSchedulePhaseFailed BackupSchedulePhase = "Failed" ) -// ScheduleStatus defines the status of each schedule. +// ScheduleStatus represents the status of each schedule. type ScheduleStatus struct { - // phase describes the phase of the schedule. + // Describes the phase of the schedule. + // // +optional Phase SchedulePhase `json:"phase,omitempty"` - // failureReason is an error that caused the backup to fail. + // Represents an error that caused the backup to fail. + // // +optional FailureReason string `json:"failureReason,omitempty"` - // lastScheduleTime records the last time the backup was scheduled. + // Records the last time the backup was scheduled. + // // +optional LastScheduleTime *metav1.Time `json:"lastScheduleTime,omitempty"` - // lastSuccessfulTime records the last time the backup was successfully completed. + // Records the last time the backup was successfully completed. + // // +optional LastSuccessfulTime *metav1.Time `json:"lastSuccessfulTime,omitempty"` } -// SchedulePhase defines the phase of schedule +// SchedulePhase represents the phase of a schedule. type SchedulePhase string const ( diff --git a/apis/dataprotection/v1alpha1/restore_types.go b/apis/dataprotection/v1alpha1/restore_types.go index db955651662..66873cae4b8 100644 --- a/apis/dataprotection/v1alpha1/restore_types.go +++ b/apis/dataprotection/v1alpha1/restore_types.go @@ -26,7 +26,7 @@ import ( // RestoreSpec defines the desired state of Restore type RestoreSpec struct { - // backup to be restored. The restore behavior based on the backup type: + // Specifies the backup to be restored. The restore behavior is based on the backup type: // // 1. Full: will be restored the full backup directly. // 2. Incremental: will be restored sequentially from the most recent full backup of this incremental backup. @@ -37,32 +37,37 @@ type RestoreSpec struct { // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.backupName" Backup BackupRef `json:"backup"` - // restoreTime is the point in time for restoring. + // Specifies the point in time for restoring. + // // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.restoreTime" // +optional // +kubebuilder:validation:Pattern=`^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$` RestoreTime string `json:"restoreTime,omitempty"` - // restore the specified resources of kubernetes. + // Restores the specified resources of Kubernetes. + // // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.resources" // +optional Resources *RestoreKubeResources `json:"resources,omitempty"` - // configuration for the action of "prepareData" phase, including the persistent volume claims + // Configuration for the action of "prepareData" phase, including the persistent volume claims // that need to be restored and scheduling strategy of temporary recovery pod. + // // +optional PrepareDataConfig *PrepareDataConfig `json:"prepareDataConfig,omitempty"` - // service account name which needs for recovery pod. + // Specifies the service account name needed for recovery pod. + // // +optional ServiceAccountName string `json:"serviceAccountName,omitempty"` - // configuration for the action of "postReady" phase. + // Configuration for the action of "postReady" phase. + // // +kubebuilder:validation:XValidation:rule="has(self.jobAction) || has(self.execAction)", message="at least one exists for jobAction and execAction." // +optional ReadyConfig *ReadyConfig `json:"readyConfig,omitempty"` - // list of environment variables to set in the container for restore and will be + // List of environment variables to set in the container for restore. These will be // merged with the env of Backup and ActionSet. // // The priority of merging is as follows: `Restore env > Backup env > ActionSet env`. @@ -71,11 +76,13 @@ type RestoreSpec struct { // +optional Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name"` - // specified the required resources of restore job's container. + // Specifies the required resources of restore job's container. + // // +optional ContainerResources corev1.ResourceRequirements `json:"containerResources,omitempty"` // Specifies the number of retries before marking the restore failed. + // // +optional // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=10 @@ -84,117 +91,136 @@ type RestoreSpec struct { // BackupRef describes the backup name and namespace. type BackupRef struct { - // backup name + // Specifies the backup name. + // // +kubebuilder:validation:Required Name string `json:"name"` - // backup namespace + // Specifies the backup namespace. + // // +kubebuilder:validation:Required Namespace string `json:"namespace"` } type RestoreKubeResources struct { - // will restore the specified resources + // Restores the specified resources. + // + // +optional IncludeResources []IncludeResource `json:"included,omitempty"` // TODO: supports exclude resources for recovery } type IncludeResource struct { - // // +kubebuilder:validation:Required GroupResource string `json:"groupResource"` - // select the specified resource for recovery by label. + // Selects the specified resource for recovery by label. + // // +optional LabelSelector metav1.LabelSelector `json:"labelSelector,omitempty"` } type PrepareDataConfig struct { - // dataSourceRef describes the configuration when using `persistentVolumeClaim.spec.dataSourceRef` method for restoring. - // it describes the source volume of the backup targetVolumes and how to mount path in the restoring container. + // Specifies the configuration when using `persistentVolumeClaim.spec.dataSourceRef` method for restoring. + // Describes the source volume of the backup targetVolumes and the mount path in the restoring container. + // // +kubebuilder:validation:XValidation:rule="self.volumeSource != '' || self.mountPath !=''",message="at least one exists for volumeSource and mountPath." // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.prepareDataConfig.dataSourceRef" // +optional DataSourceRef *VolumeConfig `json:"dataSourceRef,omitempty"` - // 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. + // Defines the persistent Volume claims that need to be restored and mounted together into the restore job. + // These persistent Volume claims will be created if they do not exist. + // // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.prepareDataConfig.volumeClaims" // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +optional RestoreVolumeClaims []RestoreVolumeClaim `json:"volumeClaims,omitempty"` - // 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. + // 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 they already exist. + // // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.prepareDataConfig.volumeClaimsTemplate" // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +optional RestoreVolumeClaimsTemplate *RestoreVolumeClaimsTemplate `json:"volumeClaimsTemplate,omitempty"` - // VolumeClaimRestorePolicy defines restore policy for persistent volume claim. + // Defines restore policy for persistent volume claim. // Supported policies are as follows: // - // 1. Parallel: parallel recovery of persistent volume claim. - // 2. Serial: restore the persistent volume claim in sequence, and wait until the previous persistent volume claim is restored before restoring a new one. + // - `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. // // +kubebuilder:default=Parallel // +kubebuilder:validation:Required VolumeClaimRestorePolicy VolumeClaimRestorePolicy `json:"volumeClaimRestorePolicy"` - // scheduling spec for restoring pod. + // Specifies the scheduling spec for the restoring pod. + // // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="forbidden to update spec.prepareDataConfig.schedulingSpec" // +optional SchedulingSpec SchedulingSpec `json:"schedulingSpec,omitempty"` } type ReadyConfig struct { - // configuration for job action. + // Specifies the configuration for a job action. + // // +optional JobAction *JobAction `json:"jobAction,omitempty"` - // configuration for exec action. + // Specifies the configuration for an exec action. + // // +optional ExecAction *ExecAction `json:"execAction,omitempty"` - // credential template used for creating a connection credential + // Defines the credential template used to create a connection credential. + // // +optional ConnectionCredential *ConnectionCredential `json:"connectionCredential,omitempty"` - // periodic probe of the service readiness. - // controller will perform postReadyHooks of BackupScript.spec.restore after the service readiness when readinessProbe is configured. + // Defines a periodic probe of the service readiness. + // The controller will perform postReadyHooks of BackupScript.spec.restore + // after the service readiness when readinessProbe is configured. + // // +optional ReadinessProbe *ReadinessProbe `json:"readinessProbe,omitempty"` } type JobAction struct { - // jobActionTarget defines the pod that need to be executed for the job action. - // will select a pod that meets the conditions to execute. + // Defines the pod that needs to be executed for the job action. + // A pod that meets the conditions will be selected for execution. + // // +kubebuilder:validation:Required Target JobActionTarget `json:"target"` } type ExecAction struct { - // execActionTarget defines the pods that need to be executed for the exec action. - // will execute on all pods that meet the conditions. + // Defines the pods that need to be executed for the exec action. + // Execution will occur on all pods that meet the conditions. + // // +optional Target ExecActionTarget `json:"target"` } type ExecActionTarget struct { - // kubectl exec in all selected pods. + // Executes kubectl in all selected pods. + // // +kubebuilder:validation:Required PodSelector metav1.LabelSelector `json:"podSelector"` } type JobActionTarget struct { - // 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. + // Selects one of the pods, identified by labels, to build the job spec. + // This includes mounting required volumes and injecting built-in environment variables of the selected pod. + // // +kubebuilder:validation:Required PodSelector metav1.LabelSelector `json:"podSelector"` - // volumeMounts defines which volumes of the selected pod need to be mounted on the restoring pod. + // Defines which volumes of the selected pod need to be mounted on the restoring pod. + // // +patchMergeKey=name // +patchStrategy=merge,retainKeys // +optional @@ -202,104 +228,122 @@ type JobActionTarget struct { } type VolumeConfig struct { - // volumeSource describes the volume will be restored from the specified volume of the backup targetVolumes. - // required if the backup uses volume snapshot. + // Describes the volume that will be restored from the specified volume of the backup targetVolumes. + // This is required if the backup uses a volume snapshot. + // // +optional VolumeSource string `json:"volumeSource,omitempty"` - // mountPath path within the restoring container at which the volume should be mounted. + // Specifies the path within the restoring container at which the volume should be mounted. + // // +optional MountPath string `json:"mountPath,omitempty"` } type RestoreVolumeClaim struct { - // Standard object's metadata. + // Specifies the standard metadata for the object. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // // +kubebuilder:validation:Required metav1.ObjectMeta `json:"metadata"` - // volumeClaimSpec defines the desired characteristics of a persistent volume claim. + // Defines the desired characteristics of a persistent volume claim. + // // +kubebuilder:validation:Required VolumeClaimSpec corev1.PersistentVolumeClaimSpec `json:"volumeClaimSpec"` - // describing the source volume of the backup targetVolumes and how to mount path in the restoring container. + // Describes the source volume of the backup target volumes and the mount path in the restoring container. + // At least one must exist for volumeSource and mountPath. + // // +kubebuilder:validation:XValidation:rule="self.volumeSource != '' || self.mountPath !=''",message="at least one exists for volumeSource and mountPath." VolumeConfig `json:",inline"` } type RestoreVolumeClaimsTemplate struct { - // templates is a list of volume claims. + // Contains a list of volume claims. // +kubebuilder:validation:Required Templates []RestoreVolumeClaim `json:"templates"` - // the replicas of persistent volume claim which need to be created and restored. - // the format of created claim name is `$(template-name)-$(index)`. + // Specifies the replicas of persistent volume claim that need to be created and restored. + // The format of the created claim name is `$(template-name)-$(index)`. + // // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Required Replicas int32 `json:"replicas"` - // the starting index for the created persistent volume claim by according to template. - // minimum is 0. + // Specifies the starting index for the created persistent volume claim according to the template. + // The minimum value is 0. + // // +kubebuilder:validation:Minimum=0 StartingIndex int32 `json:"startingIndex,omitempty"` } type SchedulingSpec struct { - // the restoring pod's tolerations. + // Specifies the tolerations for the restoring pod. + // // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - // 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. + // Defines a selector which must be true for the pod to fit on a node. + // The selector 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/ + // // +optional // +mapType=atomic NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // nodeName is a request to schedule this pod onto a specific node. If it is non-empty, + // Specifies 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. + // // +optional NodeName string `json:"nodeName,omitempty"` - // affinity is a group of affinity scheduling rules. - // refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + // Contains a group of affinity scheduling rules. + // Refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + // // +optional Affinity *corev1.Affinity `json:"affinity,omitempty"` - // 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/ + // Describes how a group of pods ought to spread across topology + // domains. The scheduler will schedule pods in a way which abides by the constraints. + // Refer to https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ + // // +optional TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` - // If specified, the pod will be dispatched by specified scheduler. - // If not specified, the pod will be dispatched by default scheduler. + // Specifies the scheduler to dispatch the pod. + // If not specified, the pod will be dispatched by the default scheduler. + // // +optional SchedulerName string `json:"schedulerName,omitempty"` } type ReadinessProbe struct { - // number of seconds after the container has started before probe is initiated. + // Specifies the number of seconds after the container has started before the probe is initiated. + // // +optional // +kubebuilder:validation:Minimum=0 InitialDelaySeconds int `json:"initialDelaySeconds,omitempty"` - // number of seconds after which the probe times out. - // defaults to 30 second, minimum value is 1. + // Specifies the number of seconds after which the probe times out. + // The default value is 30 seconds, and the minimum value is 1. + // // +optional // +kubebuilder:default=30 // +kubebuilder:validation:Minimum=1 TimeoutSeconds int `json:"timeoutSeconds"` - // how often (in seconds) to perform the probe. - // defaults to 5 second, minimum value is 1. + // Specifies how often (in seconds) to perform the probe. + // The default value is 5 seconds, and the minimum value is 1. + // // +optional // +kubebuilder:default=5 // +kubebuilder:validation:Minimum=1 PeriodSeconds int `json:"periodSeconds"` - // exec specifies the action to take. + // Specifies the action to take. + // // +kubebuilder:validation:Required Exec ReadinessProbeExecAction `json:"exec"` @@ -307,23 +351,27 @@ type ReadinessProbe struct { } type ReadinessProbeExecAction struct { - // refer to container image. + // Refers to the container image. + // // +kubebuilder:validation:Required Image string `json:"image"` - // refer to container command. + // Refers to the container command. + // // +kubebuilder:validation:Required Command []string `json:"command"` } type RestoreStatusActions struct { - // record the actions for prepareData phase. + // Records the actions for the prepareData phase. + // // +patchMergeKey=jobName // +patchStrategy=merge,retainKeys // +optional PrepareData []RestoreStatusAction `json:"prepareData,omitempty"` - // record the actions for postReady phase. + // Records the actions for the postReady phase. + // // +patchMergeKey=jobName // +patchStrategy=merge,retainKeys // +optional @@ -331,58 +379,72 @@ type RestoreStatusActions struct { } type RestoreStatusAction struct { - // name describes the name of the recovery action based on the current backup. + // Describes the name of the restore action based on the current backup. + // // +kubebuilder:validation:Required Name string `json:"name"` - // which backup's restore action belongs to. + // Describes which backup's restore action belongs to. + // // +kubebuilder:validation:Required BackupName string `json:"backupName"` - // the execution object of the restore action. + // Describes the execution object of the restore action. + // // +kubebuilder:validation:Required ObjectKey string `json:"objectKey"` - // message is a human-readable message indicating details about the object condition. + // Provides a human-readable message indicating details about the object condition. + // // +optional Message string `json:"message,omitempty"` - // the status of this action. + // The status of this action. + // // +kubebuilder:validation:Required Status RestoreActionStatus `json:"status,omitempty"` - // startTime is the start time for the restore job. + // The start time of the restore job. + // // +optional StartTime metav1.Time `json:"startTime,omitempty"` - // endTime is the completion time for the restore job. + // The completion time of the restore job. + // // +optional EndTime metav1.Time `json:"endTime,omitempty"` } // RestoreStatus defines the observed state of Restore type RestoreStatus struct { + // Represents the current phase of the restore. + // // +optional Phase RestorePhase `json:"phase,omitempty"` - // Date/time when the restore started being processed. + // Records the date/time when the restore started being processed. + // // +optional StartTimestamp *metav1.Time `json:"startTimestamp,omitempty"` - // Date/time when the restore finished being processed. + // Records the date/time when the restore finished being processed. + // // +optional CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty"` - // The duration time of restore execution. + // Records the duration of the restore execution. // When converted to a string, the form is "1h2m0.5s". + // // +optional Duration *metav1.Duration `json:"duration,omitempty"` - // recorded all restore actions performed. + // Records all restore actions performed. + // // +optional Actions RestoreStatusActions `json:"actions,omitempty"` - // describe current state of restore API Resource, like warning. + // Describes the current state of the restore API Resource, like warning. + // // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/config/crd/bases/apps.kubeblocks.io_backuppolicytemplates.yaml b/config/crd/bases/apps.kubeblocks.io_backuppolicytemplates.yaml index b7b4cfb0638..80c8d7c07b4 100644 --- a/config/crd/bases/apps.kubeblocks.io_backuppolicytemplates.yaml +++ b/config/crd/bases/apps.kubeblocks.io_backuppolicytemplates.yaml @@ -65,14 +65,14 @@ spec: items: properties: actionSetName: - description: 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. + description: 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. type: string env: - description: env specifies the environment variables for - the backup workload. + description: Specifies the environment variables for the + backup workload. items: description: EnvVar represents an environment variable present in a Container. @@ -254,16 +254,16 @@ spec: type: object type: array name: - description: the name of backup method. + description: The name of backup method. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string runtimeSettings: - description: runtimeSettings specifies runtime settings - for the backup workload container. + description: Specifies runtime settings for the backup + workload container. properties: resources: - description: 'resources specifies the resource required - by container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + description: 'Specifies the resource required by container. + More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' properties: claims: description: "Claims lists the names of resources, @@ -317,14 +317,14 @@ spec: type: object snapshotVolumes: default: false - description: 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. + description: Specifies whether to take snapshots of persistent + volumes. If true, the ActionSetName is not required, + the controller will use the CSI volume snapshotter to + create the snapshot. type: boolean target: - description: target specifies the target information to - back up, it will override the global target policy. + description: Specifies the target information to back + up, it will override the target in backup policy. properties: account: description: "Refers to spec.componentDef.systemAccounts.accounts[*].name @@ -336,35 +336,34 @@ spec: target secret." type: string connectionCredential: - description: connectionCredential specifies the connection - credential to connect to the target database cluster. + description: Specifies the connection credential to + connect to the target database cluster. properties: hostKey: - description: hostKey specifies the map key of - the host in the connection credential secret. + description: Specifies the map key of the host + in the connection credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of - the port in the connection credential secret. + description: Specifies the map key of the port + in the connection credential secret. type: string secretName: - description: secretName refers to the Secret object - that contains the connection credential. + description: Refers to the Secret object that + contains the connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key - of the user in the connection credential secret. + description: Specifies the map key of the user + in the connection credential secret. type: string required: - secretName @@ -395,9 +394,8 @@ spec: type: string type: object podSelector: - description: podSelector is used to find the target - pod. The volumes of the target pod will be backed - up. + description: Used to find the target pod. The volumes + of the target pod will be backed up. properties: matchExpressions: description: matchExpressions is a list of label @@ -444,11 +442,12 @@ spec: type: object strategy: default: Any - description: "strategy specifies the strategy - to select the target pod when multiple pods - are selected. Valid values are: \n - Any: select + description: "Specifies the strategy to select + the target pod when multiple pods are selected. + Valid values are: Any: select any one pod that + match the labelsSelector. \n - `Any`: select any one pod that match the labelsSelector. - - All: select all pods that match the labelsSelector." + `All`: select all pods that match the labelsSelector." enum: - Any - All @@ -456,8 +455,8 @@ spec: type: object x-kubernetes-map-type: atomic resources: - description: resources specifies the kubernetes resources - to back up. + description: Specifies the kubernetes resources to + back up. properties: excluded: description: excluded is a slice of namespaced-scoped @@ -467,20 +466,17 @@ spec: type: string type: array included: - default: - - '*' description: 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. + resources. The default value is empty. items: type: string type: array selector: - description: 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. + description: 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. properties: matchExpressions: description: matchExpressions is a list of @@ -545,8 +541,8 @@ spec: the BackupPolicy's target attribute." type: string serviceAccountName: - description: serviceAccountName specifies the service - account to run the backup workload. + description: Specifies the service account to run + the backup workload. type: string strategy: description: "Specifies the PodSelectionStrategy to @@ -562,12 +558,12 @@ spec: - role type: object targetVolumes: - description: targetVolumes specifies which volumes from - the target should be mounted in the backup workload. + description: Specifies which volumes from the target should + be mounted in the backup workload. properties: volumeMounts: - description: volumeMounts specifies the mount for - the volumes specified in `Volumes` section. + description: Specifies the mount for the volumes specified + in `volumes` section. items: description: VolumeMount describes a mounting of a Volume within a container. @@ -611,9 +607,9 @@ spec: type: object type: array volumes: - description: Volumes indicates the list of volumes - of targeted application that should be mounted on - the backup job. + description: Specifies the list of volumes of targeted + application that should be mounted on the backup + workload. items: type: string type: array diff --git a/config/crd/bases/dataprotection.kubeblocks.io_actionsets.yaml b/config/crd/bases/dataprotection.kubeblocks.io_actionsets.yaml index 8e587fedb29..be79fcc1e0d 100644 --- a/config/crd/bases/dataprotection.kubeblocks.io_actionsets.yaml +++ b/config/crd/bases/dataprotection.kubeblocks.io_actionsets.yaml @@ -50,49 +50,49 @@ spec: description: ActionSetSpec defines the desired state of ActionSet properties: backup: - description: backup specifies the backup action. + description: Specifies the backup action. properties: backupData: - description: backupData specifies the backup data action. + description: Represents the action to be performed for backing + up data. properties: command: - description: command specifies the commands to back up the - volume data. + description: Defines the commands to back up the volume data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string onError: default: Fail - description: OnError specifies how should behave if it encounters - an error executing this action. + description: Indicates how to behave if an error is encountered + during the execution of this action. enum: - Continue - Fail type: string runOnTargetPodNode: default: false - description: 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. + description: Determines whether to run the job workload on + the target pod node. If the backup container needs to mount + the target pod's volumes, this field should be set to true. + Otherwise, the target pod's volumes will be ignored. type: boolean syncProgress: - description: syncProgress specifies whether to sync the backup - progress and its interval seconds. + description: Determines if the backup progress should be synchronized + and the interval for synchronization in seconds. properties: enabled: - description: 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. + description: Determines if the backup progress should + be synchronized. If set to true, a sidecar container + will be instantiated to synchronize the backup progress + with the Backup Custom Resource (CR) status. type: boolean intervalSeconds: default: 60 - description: intervalSeconds specifies the interval seconds - to sync the backup progress. + description: Defines the interval in seconds for synchronizing + the backup progress. format: int32 type: integer type: object @@ -101,72 +101,72 @@ spec: - image type: object postBackup: - description: postBackup specifies a hook that should be executed - after the backup. + description: Represents a set of actions that should be executed + after the backup process has completed. items: description: ActionSpec defines an action that should be executed. Only one of the fields may be set. properties: exec: - description: exec specifies the action should be executed - by the pod exec API in a container. + description: Specifies that the action should be executed + using the pod's exec API within a container. properties: command: - description: Command is the command and arguments to - execute. + description: Defines the command and arguments to be + executed. items: type: string minItems: 1 type: array container: - description: container is the container in the pod where - the command should be executed. If not specified, - the pod's first container is used. + description: Specifies the container within the pod + where the command should be executed. If not specified, + the first container in the pod is used by default. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string timeout: - description: Timeout defines the maximum amount of time - should wait for the hook to complete before considering - the execution a failure. + description: Specifies the maximum duration to wait + for the hook to complete before considering the execution + a failure. type: string required: - command type: object job: - description: job specifies the action should be executed + description: Specifies that the action should be executed by a Kubernetes Job. properties: command: - description: command specifies the commands to back - up the volume data. + description: Defines the commands to back up the volume + data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string runOnTargetPodNode: default: false - description: 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. + description: Determines whether to run the job workload + on the target pod node. If the backup container needs + to mount the target pod's volumes, this field should + be set to true. Otherwise, the target pod's volumes + will be ignored. type: boolean required: - command @@ -175,72 +175,72 @@ spec: type: object type: array preBackup: - description: preBackup specifies a hook that should be executed - before the backup. + description: Represents a set of actions that should be executed + before the backup process begins. items: description: ActionSpec defines an action that should be executed. Only one of the fields may be set. properties: exec: - description: exec specifies the action should be executed - by the pod exec API in a container. + description: Specifies that the action should be executed + using the pod's exec API within a container. properties: command: - description: Command is the command and arguments to - execute. + description: Defines the command and arguments to be + executed. items: type: string minItems: 1 type: array container: - description: container is the container in the pod where - the command should be executed. If not specified, - the pod's first container is used. + description: Specifies the container within the pod + where the command should be executed. If not specified, + the first container in the pod is used by default. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string timeout: - description: Timeout defines the maximum amount of time - should wait for the hook to complete before considering - the execution a failure. + description: Specifies the maximum duration to wait + for the hook to complete before considering the execution + a failure. type: string required: - command type: object job: - description: job specifies the action should be executed + description: Specifies that the action should be executed by a Kubernetes Job. properties: command: - description: command specifies the commands to back - up the volume data. + description: Defines the commands to back up the volume + data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string runOnTargetPodNode: default: false - description: 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. + description: Determines whether to run the job workload + on the target pod node. If the backup container needs + to mount the target pod's volumes, this field should + be set to true. Otherwise, the target pod's volumes + will be ignored. type: boolean required: - command @@ -249,18 +249,17 @@ spec: type: object type: array preDelete: - description: 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. + description: 'Represents a custom deletion action that can be + executed before the built-in deletion action. Note: The preDelete + action job will ignore the env/envFrom.' properties: command: - description: command specifies the commands to back up the - volume data. + description: Defines the commands to back up the volume data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string required: - command @@ -280,16 +279,17 @@ spec: - Differential - Continuous default: Full - description: "backupType specifies the backup type, supported values: - \n - `Full` means full backup. - `Incremental` means back up data - that have changed since the last backup (full or incremental). - - `Differential` means back up data that have changed since the last - full backup. - `Continuous` will back up the transaction log continuously, - the PITR (Point in Time Recovery) can be performed based on the - continuous backup and full backup." + description: "Specifies the backup type. Supported values include: + \n - `Full` for a full backup. - `Incremental` back up data that + have changed since the last backup (either full or incremental). + - `Differential` back up data that has changed since the last full + backup. - `Continuous` back up transaction logs continuously, such + as MySQL binlog, PostgreSQL WAL, etc. \n Continuous backup is essential + for implementing Point-in-Time Recovery (PITR)." type: string env: - description: List of environment variables to set in the container. + description: Specifies a list of environment variables to be set in + the container. items: description: EnvVar represents an environment variable present in a Container. @@ -399,12 +399,12 @@ spec: type: array x-kubernetes-preserve-unknown-fields: true envFrom: - description: 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. + description: "Specifies a list of sources to populate environment + variables in the container. The keys within a source must be a C_IDENTIFIER. + Any invalid keys will be reported as an event when the container + starts. If a key exists in multiple sources, the value from the + last source will take precedence. Any values defined by an Env with + a duplicate key will take precedence. \n This field cannot be updated." items: description: EnvFromSource represents the source of a set of ConfigMaps properties: @@ -440,75 +440,75 @@ spec: type: array x-kubernetes-preserve-unknown-fields: true restore: - description: restore specifies the restore action. + description: Specifies the restore action. properties: postReady: - description: postReady specifies the action to execute after the - data is ready. + description: Specifies the actions that should be executed after + the data has been prepared and is ready for restoration. items: description: ActionSpec defines an action that should be executed. Only one of the fields may be set. properties: exec: - description: exec specifies the action should be executed - by the pod exec API in a container. + description: Specifies that the action should be executed + using the pod's exec API within a container. properties: command: - description: Command is the command and arguments to - execute. + description: Defines the command and arguments to be + executed. items: type: string minItems: 1 type: array container: - description: container is the container in the pod where - the command should be executed. If not specified, - the pod's first container is used. + description: Specifies the container within the pod + where the command should be executed. If not specified, + the first container in the pod is used by default. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string timeout: - description: Timeout defines the maximum amount of time - should wait for the hook to complete before considering - the execution a failure. + description: Specifies the maximum duration to wait + for the hook to complete before considering the execution + a failure. type: string required: - command type: object job: - description: job specifies the action should be executed + description: Specifies that the action should be executed by a Kubernetes Job. properties: command: - description: command specifies the commands to back - up the volume data. + description: Defines the commands to back up the volume + data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string runOnTargetPodNode: default: false - description: 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. + description: Determines whether to run the job workload + on the target pod node. If the backup container needs + to mount the target pod's volumes, this field should + be set to true. Otherwise, the target pod's volumes + will be ignored. type: boolean required: - command @@ -517,32 +517,31 @@ spec: type: object type: array prepareData: - description: prepareData specifies the action to prepare data. + description: Specifies the action required to prepare data for + restoration. properties: command: - description: command specifies the commands to back up the - volume data. + description: Defines the commands to back up the volume data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string onError: default: Fail - description: OnError specifies how should behave if it encounters - an error executing this action. + description: Indicates how to behave if an error is encountered + during the execution of this action. enum: - Continue - Fail type: string runOnTargetPodNode: default: false - description: 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. + description: Determines whether to run the job workload on + the target pod node. If the backup container needs to mount + the target pod's volumes, this field should be set to true. + Otherwise, the target pod's volumes will be ignored. type: boolean required: - command @@ -556,15 +555,17 @@ spec: description: ActionSetStatus defines the observed state of ActionSet properties: message: - description: A human-readable message indicating details about why - the ActionSet is in this phase. + description: Provides a human-readable explanation detailing the reason + for the current phase of the ActionSet. type: string observedGeneration: - description: generation number + description: Represents the generation number that has been observed + by the controller. format: int64 type: integer phase: - description: phase - in list of [Available,Unavailable] + description: Indicates the phase of the ActionSet. This can be either + 'Available' or 'Unavailable'. enum: - Available - Unavailable diff --git a/config/crd/bases/dataprotection.kubeblocks.io_backuppolicies.yaml b/config/crd/bases/dataprotection.kubeblocks.io_backuppolicies.yaml index e4e7072d2ff..01d85fd4d93 100644 --- a/config/crd/bases/dataprotection.kubeblocks.io_backuppolicies.yaml +++ b/config/crd/bases/dataprotection.kubeblocks.io_backuppolicies.yaml @@ -51,25 +51,25 @@ spec: properties: backoffLimit: description: Specifies the number of retries before marking the backup - failed. + as failed. format: int32 maximum: 10 minimum: 0 type: integer backupMethods: - description: backupMethods defines the backup methods. + description: Defines the backup methods. items: description: BackupMethod defines the backup method. properties: actionSetName: - description: 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. + description: 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. type: string env: - description: env specifies the environment variables for the - backup workload. + description: Specifies the environment variables for the backup + workload. items: description: EnvVar represents an environment variable present in a Container. @@ -187,16 +187,16 @@ spec: type: object type: array name: - description: the name of backup method. + description: The name of backup method. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string runtimeSettings: - description: runtimeSettings specifies runtime settings for - the backup workload container. + description: Specifies runtime settings for the backup workload + container. properties: resources: - description: 'resources specifies the resource required - by container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + description: 'Specifies the resource required by container. + More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' properties: claims: description: "Claims lists the names of resources, defined @@ -248,51 +248,50 @@ spec: type: object snapshotVolumes: default: false - description: 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. + description: Specifies whether to take snapshots of persistent + volumes. If true, the ActionSetName is not required, the controller + will use the CSI volume snapshotter to create the snapshot. type: boolean target: - description: target specifies the target information to back - up, it will override the global target policy. + description: Specifies the target information to back up, it + will override the target in backup policy. properties: connectionCredential: - description: connectionCredential specifies the connection - credential to connect to the target database cluster. + description: Specifies the connection credential to connect + to the target database cluster. properties: hostKey: - description: hostKey specifies the map key of the host - in the connection credential secret. + description: Specifies the map key of the host in the + connection credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of the port - in the connection credential secret. + description: Specifies the map key of the port in the + connection credential secret. type: string secretName: - description: secretName refers to the Secret object - that contains the connection credential. + description: Refers to the Secret object that contains + the connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key of the - user in the connection credential secret. + description: Specifies the map key of the user in the + connection credential secret. type: string required: - secretName type: object podSelector: - description: podSelector is used to find the target pod. - The volumes of the target pod will be backed up. + description: Used to find the target pod. The volumes of + the target pod will be backed up. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -337,11 +336,11 @@ spec: type: object strategy: default: Any - description: "strategy specifies the strategy to select - the target pod when multiple pods are selected. Valid - values are: \n - Any: select any one pod that match - the labelsSelector. - All: select all pods that match - the labelsSelector." + description: "Specifies the strategy to select the target + pod when multiple pods are selected. Valid values + are: Any: select any one pod that match the labelsSelector. + \n - `Any`: select any one pod that match the labelsSelector. + - `All`: select all pods that match the labelsSelector." enum: - Any - All @@ -349,8 +348,8 @@ spec: type: object x-kubernetes-map-type: atomic resources: - description: resources specifies the kubernetes resources - to back up. + description: Specifies the kubernetes resources to back + up. properties: excluded: description: excluded is a slice of namespaced-scoped @@ -360,20 +359,16 @@ spec: type: string type: array included: - default: - - '*' description: 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. + The default value is empty. items: type: string type: array selector: - description: 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. + description: 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. properties: matchExpressions: description: matchExpressions is a list of label @@ -421,17 +416,17 @@ spec: x-kubernetes-map-type: atomic type: object serviceAccountName: - description: serviceAccountName specifies the service account - to run the backup workload. + description: Specifies the service account to run the backup + workload. type: string type: object targetVolumes: - description: targetVolumes specifies which volumes from the - target should be mounted in the backup workload. + description: Specifies which volumes from the target should + be mounted in the backup workload. properties: volumeMounts: - description: volumeMounts specifies the mount for the volumes - specified in `Volumes` section. + description: Specifies the mount for the volumes specified + in `volumes` section. items: description: VolumeMount describes a mounting of a Volume within a container. @@ -472,8 +467,8 @@ spec: type: object type: array volumes: - description: Volumes indicates the list of volumes of targeted - application that should be mounted on the backup job. + description: Specifies the list of volumes of targeted application + that should be mounted on the backup workload. items: type: string type: array @@ -483,55 +478,56 @@ spec: type: object type: array backupRepoName: - description: 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. + description: Specifies the name of BackupRepo where the backup data + will be stored. If not set, data will be stored in the default backup + repository. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string pathPrefix: - description: pathPrefix is the directory inside the backup repository - to store the backup content. It is a relative to the path of the - backup repository. + description: Specifies the directory inside the backup repository + to store the backup. This path is relative to the path of the backup + repository. type: string target: - description: target specifies the target information to back up. + description: Specifies the target information to back up, such as + the target pod, the cluster connection credential. properties: connectionCredential: - description: connectionCredential specifies the connection credential - to connect to the target database cluster. + description: Specifies the connection credential to connect to + the target database cluster. properties: hostKey: - description: hostKey specifies the map key of the host in - the connection credential secret. + description: Specifies the map key of the host in the connection + credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of the port in - the connection credential secret. + description: Specifies the map key of the port in the connection + credential secret. type: string secretName: - description: secretName refers to the Secret object that contains - the connection credential. + description: Refers to the Secret object that contains the + connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key of the user - in the connection credential secret. + description: Specifies the map key of the user in the connection + credential secret. type: string required: - secretName type: object podSelector: - description: podSelector is used to find the target pod. The volumes - of the target pod will be backed up. + description: Used to find the target pod. The volumes of the target + pod will be backed up. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -575,10 +571,11 @@ spec: type: object strategy: default: Any - description: "strategy specifies the strategy to select the - target pod when multiple pods are selected. Valid values - are: \n - Any: select any one pod that match the labelsSelector. - - All: select all pods that match the labelsSelector." + description: "Specifies the strategy to select the target + pod when multiple pods are selected. Valid values are: Any: + select any one pod that match the labelsSelector. \n - `Any`: + select any one pod that match the labelsSelector. - `All`: + select all pods that match the labelsSelector." enum: - Any - All @@ -586,8 +583,7 @@ spec: type: object x-kubernetes-map-type: atomic resources: - description: resources specifies the kubernetes resources to back - up. + description: Specifies the kubernetes resources to back up. properties: excluded: description: excluded is a slice of namespaced-scoped resource @@ -597,18 +593,16 @@ spec: type: string type: array included: - default: - - '*' description: 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. + value is empty. items: type: string type: array selector: - description: 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. + description: 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. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -655,16 +649,15 @@ spec: x-kubernetes-map-type: atomic type: object serviceAccountName: - description: serviceAccountName specifies the service account - to run the backup workload. + description: Specifies the service account to run the backup workload. type: string type: object useKopia: default: false - description: "useKopia specifies whether backup data should be stored - in a Kopia repository. \n 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 + description: "Specifies whether backup data should be stored in a + Kopia repository. \n 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. \n NOTE: This feature should NOT be enabled when using KubeBlocks Community Edition, otherwise the backup will @@ -682,13 +675,13 @@ spec: the BackupPolicy is in this phase. type: string observedGeneration: - description: observedGeneration is the most recent generation observed + description: 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. format: int64 type: integer phase: - description: phase - in list of [Available,Unavailable] + description: Phase - in list of [Available,Unavailable] enum: - Available - Unavailable diff --git a/config/crd/bases/dataprotection.kubeblocks.io_backups.yaml b/config/crd/bases/dataprotection.kubeblocks.io_backups.yaml index 5cbaccd1b54..d799b251cbb 100644 --- a/config/crd/bases/dataprotection.kubeblocks.io_backups.yaml +++ b/config/crd/bases/dataprotection.kubeblocks.io_backups.yaml @@ -66,14 +66,14 @@ spec: description: BackupSpec defines the desired state of Backup. properties: backupMethod: - description: backupMethod specifies the backup method name that is - defined in backupPolicy. + description: Specifies the backup method name that is defined in the + backup policy. type: string x-kubernetes-validations: - message: forbidden to update spec.backupMethod rule: self == oldSelf backupPolicyName: - description: Which backupPolicy is applied to perform this backup. + description: Specifies the backup policy to be applied for this backup. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string x-kubernetes-validations: @@ -88,32 +88,32 @@ spec: - Delete - Retain default: Delete - description: "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`. - \n - `Retain` means that the backup content and its physical snapshot - on backup repository are kept. - `Delete` means that the backup - content and its physical snapshot on backup repository are deleted. - \n TODO: for the retain policy, we should support in the future - for only deleting the backup custom objects but retaining the backup - contents in backup repository. The current implementation only prevent - accidental deletion of backup data." + description: "Determines whether the backup contents stored in the + backup repository should be deleted when the backup custom resource(CR) + is deleted. Supported values are `Retain` and `Delete`. \n - `Retain` + means that the backup content and its physical snapshot on backup + repository are kept. - `Delete` means that the backup content and + its physical snapshot on backup repository are deleted. \n TODO: + for the retain policy, we should support in the future for only + deleting the backup CR but retaining the backup contents in backup + repository. The current implementation only prevent accidental deletion + of backup data." type: string parentBackupName: - description: parentBackupName determines the parent backup name for - incremental or differential backup. + description: Determines the parent backup name for incremental or + differential backup. type: string x-kubernetes-validations: - message: forbidden to update spec.parentBackupName rule: self == oldSelf retentionPeriod: - description: "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 - `30d` will keep only the backups of last 30 days. Sample duration - format: \n - years: \t2y - months: \t6mo - days: \t\t30d - hours: - \t12h - minutes: \t30m \n You can also combine the above durations. - For example: 30d12h30m. If not set, the backup will be kept forever." + description: "Determines a duration up to which the backup should + be kept. Controller will remove all backups that are older than + the RetentionPeriod. If not set, the backup will be kept forever. + For example, RetentionPeriod of `30d` will keep only the backups + of last 30 days. Sample duration format: \n - years: \t2y - months: + \t6mo - days: \t\t30d - hours: \t12h - minutes: \t30m \n You can + also combine the above durations. For example: 30d12h30m." type: string required: - backupMethod @@ -123,31 +123,28 @@ spec: description: BackupStatus defines the observed state of Backup. properties: actions: - description: actions records the actions information for this backup. + description: Records the actions status for this backup. items: properties: actionType: - description: actionType is the type of the action. + description: The type of the action. type: string availableReplicas: - description: availableReplicas available replicas for statefulSet - action. + description: Available replicas for statefulSet action. format: int32 type: integer completionTimestamp: - description: completionTimestamp records the time an action - was completed. + description: Records the time an action was completed. format: date-time type: string failureReason: - description: failureReason is an error that caused the backup - to fail. + description: An error that caused the action to fail. type: string name: - description: name is the name of the action. + description: The name of the action. type: string objectRef: - description: objectRef is the object reference for the action. + description: The object reference for the action. properties: apiVersion: description: API version of the referent. @@ -185,71 +182,69 @@ spec: type: object x-kubernetes-map-type: atomic phase: - description: phase is the current state of the action. + description: The current phase of the action. type: string startTimestamp: - description: startTimestamp records the time an action was started. + description: Records the time an action was started. format: date-time type: string timeRange: - description: timeRange records the time range of backed up data, - for PITR, this is the time range of recoverable data. + description: Records the time range of backed up data, for PITR, + this is the time range of recoverable data. properties: end: - description: end records the end time of backup(Coordinated - Universal Time, UTC). + description: Records the end time of the backup, in Coordinated + Universal Time (UTC). format: date-time type: string start: - description: start records the start time of backup(Coordinated - Universal Time, UTC). + description: Records the start time of the backup, in Coordinated + Universal Time (UTC). format: date-time type: string timeZone: - description: 'time zone, only support zone offset, value - range: "-12:59 ~ +13:00"' + description: time zone, supports only zone offset, with + a value range of "-12:59 ~ +13:00". pattern: ^(\+|\-)(0[0-9]|1[0-3]):([0-5][0-9])$ type: string type: object totalSize: - description: totalSize is the total size of backed up data size. - A string with capacity units in the format of "1Gi", "1Mi", - "1Ki". + description: 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. type: string volumeSnapshots: - description: volumeSnapshots records the volume snapshot status - for the action. + description: Records the volume snapshot status for the action. items: properties: contentName: - description: contentName is the name of the volume snapshot - content. + description: The name of the volume snapshot content. type: string name: - description: name is the name of the volume snapshot. + description: The name of the volume snapshot. type: string size: - description: size is the size of the volume snapshot. + description: The size of the volume snapshot. type: string volumeName: - description: volumeName is the name of the volume. + description: The name of the volume. type: string type: object type: array type: object type: array backupMethod: - description: backupMethod records the backup method information for - this backup. Refer to BackupMethod for more details. + description: Records the backup method information for this backup. + Refer to BackupMethod for more details. properties: actionSetName: - description: 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. + description: 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. type: string env: - description: env specifies the environment variables for the backup + description: Specifies the environment variables for the backup workload. items: description: EnvVar represents an environment variable present @@ -364,16 +359,16 @@ spec: type: object type: array name: - description: the name of backup method. + description: The name of backup method. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string runtimeSettings: - description: runtimeSettings specifies runtime settings for the - backup workload container. + description: Specifies runtime settings for the backup workload + container. properties: resources: - description: 'resources specifies the resource required by - container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + description: 'Specifies the resource required by container. + More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' properties: claims: description: "Claims lists the names of resources, defined @@ -424,51 +419,50 @@ spec: type: object snapshotVolumes: default: false - description: 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. + description: Specifies whether to take snapshots of persistent + volumes. If true, the ActionSetName is not required, the controller + will use the CSI volume snapshotter to create the snapshot. type: boolean target: - description: target specifies the target information to back up, - it will override the global target policy. + description: Specifies the target information to back up, it will + override the target in backup policy. properties: connectionCredential: - description: connectionCredential specifies the connection - credential to connect to the target database cluster. + description: Specifies the connection credential to connect + to the target database cluster. properties: hostKey: - description: hostKey specifies the map key of the host - in the connection credential secret. + description: Specifies the map key of the host in the + connection credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of the port - in the connection credential secret. + description: Specifies the map key of the port in the + connection credential secret. type: string secretName: - description: secretName refers to the Secret object that - contains the connection credential. + description: Refers to the Secret object that contains + the connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key of the - user in the connection credential secret. + description: Specifies the map key of the user in the + connection credential secret. type: string required: - secretName type: object podSelector: - description: podSelector is used to find the target pod. The - volumes of the target pod will be backed up. + description: Used to find the target pod. The volumes of the + target pod will be backed up. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -513,11 +507,11 @@ spec: type: object strategy: default: Any - description: "strategy specifies the strategy to select - the target pod when multiple pods are selected. Valid - values are: \n - Any: select any one pod that match - the labelsSelector. - All: select all pods that match - the labelsSelector." + description: "Specifies the strategy to select the target + pod when multiple pods are selected. Valid values are: + Any: select any one pod that match the labelsSelector. + \n - `Any`: select any one pod that match the labelsSelector. + - `All`: select all pods that match the labelsSelector." enum: - Any - All @@ -525,8 +519,7 @@ spec: type: object x-kubernetes-map-type: atomic resources: - description: resources specifies the kubernetes resources - to back up. + description: Specifies the kubernetes resources to back up. properties: excluded: description: excluded is a slice of namespaced-scoped @@ -536,19 +529,16 @@ spec: type: string type: array included: - default: - - '*' description: 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. + The default value is empty. items: type: string type: array selector: - description: 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. + description: 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. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -595,17 +585,17 @@ spec: x-kubernetes-map-type: atomic type: object serviceAccountName: - description: serviceAccountName specifies the service account - to run the backup workload. + description: Specifies the service account to run the backup + workload. type: string type: object targetVolumes: - description: targetVolumes specifies which volumes from the target - should be mounted in the backup workload. + description: Specifies which volumes from the target should be + mounted in the backup workload. properties: volumeMounts: - description: volumeMounts specifies the mount for the volumes - specified in `Volumes` section. + description: Specifies the mount for the volumes specified + in `volumes` section. items: description: VolumeMount describes a mounting of a Volume within a container. @@ -646,8 +636,8 @@ spec: type: object type: array volumes: - description: Volumes indicates the list of volumes of targeted - application that should be mounted on the backup job. + description: Specifies the list of volumes of targeted application + that should be mounted on the backup workload. items: type: string type: array @@ -656,52 +646,52 @@ spec: - name type: object backupRepoName: - description: backupRepoName is the name of the backup repository. + description: The name of the backup repository. type: string completionTimestamp: - description: completionTimestamp records the time a backup was completed. - Completion time is recorded even on failed backups. The server's - time is used for CompletionTimestamp. + description: Records the time when the backup operation was completed. + This timestamp is recorded even if the backup operation fails. The + server's time is used for this timestamp. format: date-time type: string duration: - description: The duration time of backup execution. When converted + description: Records the duration of the backup operation. When converted to a string, the format is "1h2m0.5s". type: string expiration: - description: expiration is when this backup is eligible for garbage - collection. 'null' means the Backup will NOT be cleaned except delete - manual. + description: Indicates when this backup becomes eligible for garbage + collection. A 'null' value implies that the backup will not be cleaned + up unless manually deleted. format: date-time type: string extras: - description: extra records the extra info for the backup. + description: Records any additional information for the backup. items: additionalProperties: type: string type: object type: array failureReason: - description: failureReason is an error that caused the backup to fail. + description: Any error that caused the backup operation to fail. type: string formatVersion: - description: formatVersion is the backup format version, including - major, minor and patch version. + description: Specifies the backup format version, which includes major, + minor, and patch versions. type: string kopiaRepoPath: - description: kopiaRepoPath records the path of the Kopia repository. + description: Records the path of the Kopia repository. type: string path: - description: path is the directory inside the backup repository where - the backup data is stored. It is an absolute path in the backup + description: The directory within the backup repository where the + backup data is stored. This is an absolute path within the backup repository. type: string persistentVolumeClaimName: - description: persistentVolumeClaimName is the name of the persistent - volume claim that is used to store the backup data. + description: Records the name of the persistent volume claim used + to store the backup data. type: string phase: - description: phase is the current state of the Backup. + description: Indicates the current state of the backup operation. enum: - New - InProgress @@ -711,49 +701,49 @@ spec: - Deleting type: string startTimestamp: - description: startTimestamp records the time a backup was started. - The server's time is used for StartTimestamp. + description: Records the time when the backup operation was started. + The server's time is used for this timestamp. format: date-time type: string target: - description: target records the target information for this backup. + description: Records the target information for this backup. properties: connectionCredential: - description: connectionCredential specifies the connection credential - to connect to the target database cluster. + description: Specifies the connection credential to connect to + the target database cluster. properties: hostKey: - description: hostKey specifies the map key of the host in - the connection credential secret. + description: Specifies the map key of the host in the connection + credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of the port in - the connection credential secret. + description: Specifies the map key of the port in the connection + credential secret. type: string secretName: - description: secretName refers to the Secret object that contains - the connection credential. + description: Refers to the Secret object that contains the + connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key of the user - in the connection credential secret. + description: Specifies the map key of the user in the connection + credential secret. type: string required: - secretName type: object podSelector: - description: podSelector is used to find the target pod. The volumes - of the target pod will be backed up. + description: Used to find the target pod. The volumes of the target + pod will be backed up. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -797,10 +787,11 @@ spec: type: object strategy: default: Any - description: "strategy specifies the strategy to select the - target pod when multiple pods are selected. Valid values - are: \n - Any: select any one pod that match the labelsSelector. - - All: select all pods that match the labelsSelector." + description: "Specifies the strategy to select the target + pod when multiple pods are selected. Valid values are: Any: + select any one pod that match the labelsSelector. \n - `Any`: + select any one pod that match the labelsSelector. - `All`: + select all pods that match the labelsSelector." enum: - Any - All @@ -808,8 +799,7 @@ spec: type: object x-kubernetes-map-type: atomic resources: - description: resources specifies the kubernetes resources to back - up. + description: Specifies the kubernetes resources to back up. properties: excluded: description: excluded is a slice of namespaced-scoped resource @@ -819,18 +809,16 @@ spec: type: string type: array included: - default: - - '*' description: 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. + value is empty. items: type: string type: array selector: - description: 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. + description: 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. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -877,52 +865,50 @@ spec: x-kubernetes-map-type: atomic type: object serviceAccountName: - description: serviceAccountName specifies the service account - to run the backup workload. + description: Specifies the service account to run the backup workload. type: string type: object timeRange: - description: timeRange records the time range of backed up data, for - PITR, this is the time range of recoverable data. + description: Records the time range of the data backed up. For Point-in-Time + Recovery (PITR), this is the time range of recoverable data. properties: end: - description: end records the end time of backup(Coordinated Universal - Time, UTC). + description: Records the end time of the backup, in Coordinated + Universal Time (UTC). format: date-time type: string start: - description: start records the start time of backup(Coordinated - Universal Time, UTC). + description: Records the start time of the backup, in Coordinated + Universal Time (UTC). format: date-time type: string timeZone: - description: 'time zone, only support zone offset, value range: - "-12:59 ~ +13:00"' + description: time zone, supports only zone offset, with a value + range of "-12:59 ~ +13:00". pattern: ^(\+|\-)(0[0-9]|1[0-3]):([0-5][0-9])$ type: string type: object totalSize: - description: 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. + description: Records the total size of the data backed up. The size + is represented as 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. type: string volumeSnapshots: - description: volumeSnapshots records the volume snapshot status for - the action. + description: Records the volume snapshot status for the action. items: properties: contentName: - description: contentName is the name of the volume snapshot - content. + description: The name of the volume snapshot content. type: string name: - description: name is the name of the volume snapshot. + description: The name of the volume snapshot. type: string size: - description: size is the size of the volume snapshot. + description: The size of the volume snapshot. type: string volumeName: - description: volumeName is the name of the volume. + description: The name of the volume. type: string type: object type: array diff --git a/config/crd/bases/dataprotection.kubeblocks.io_backupschedules.yaml b/config/crd/bases/dataprotection.kubeblocks.io_backupschedules.yaml index be1f4f0807c..bb79927c1c9 100644 --- a/config/crd/bases/dataprotection.kubeblocks.io_backupschedules.yaml +++ b/config/crd/bases/dataprotection.kubeblocks.io_backupschedules.yaml @@ -47,34 +47,34 @@ spec: description: BackupScheduleSpec defines the desired state of BackupSchedule. properties: backupPolicyName: - description: Which backupPolicy is applied to perform this backup. + description: Specifies the backupPolicy to be applied for the `schedules`. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string schedules: - description: schedules defines the list of backup schedules. + description: Defines the list of backup schedules. items: properties: backupMethod: - description: backupMethod specifies the backup method name that - is defined in backupPolicy. + description: Specifies the backup method name that is defined + in backupPolicy. type: string cronExpression: - description: the cron expression for schedule, the timezone - is in UTC. see https://en.wikipedia.org/wiki/Cron. + description: Specifies the cron expression for the schedule. + The timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. type: string enabled: - description: enabled specifies whether the backup schedule is - enabled or not. + description: Specifies whether the backup schedule is enabled + or not. type: boolean retentionPeriod: default: 7d - description: "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 `30d` will keep only the backups of last 30 days. Sample - duration format: \n - years: \t2y - months: \t6mo - days: - \t\t30d - hours: \t12h - minutes: \t30m \n You can also combine - the above durations. For example: 30d12h30m" + description: "Determines the duration for which the backup should + be kept. KubeBlocks will remove all backups that are older + than the RetentionPeriod. For example, RetentionPeriod of + `30d` will keep only the backups of last 30 days. Sample duration + format: \n - years: \t2y - months: \t6mo - days: \t\t30d - + hours: \t12h - minutes: \t30m \n You can also combine the + above durations. For example: 30d12h30m" type: string required: - backupMethod @@ -83,9 +83,8 @@ spec: minItems: 1 type: array startingDeadlineMinutes: - description: startingDeadlineMinutes defines the deadline in minutes - for starting the backup workload if it misses scheduled time for - any reason. + description: Defines the deadline in minutes for starting the backup + workload if it misses its scheduled time for any reason. format: int64 maximum: 1440 minimum: 0 @@ -98,40 +97,38 @@ spec: description: BackupScheduleStatus defines the observed state of BackupSchedule. properties: failureReason: - description: failureReason is an error that caused the backup to fail. + description: Represents an error that caused the backup to fail. type: string observedGeneration: - description: 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. + description: Represents the most recent generation observed for this + BackupSchedule. It refers to the BackupSchedule's generation, which + is updated on mutation by the API Server. format: int64 type: integer phase: - description: phase describes the phase of the BackupSchedule. + description: Describes the phase of the BackupSchedule. type: string schedules: additionalProperties: - description: ScheduleStatus defines the status of each schedule. + description: ScheduleStatus represents the status of each schedule. properties: failureReason: - description: failureReason is an error that caused the backup - to fail. + description: Represents an error that caused the backup to fail. type: string lastScheduleTime: - description: lastScheduleTime records the last time the backup - was scheduled. + description: Records the last time the backup was scheduled. format: date-time type: string lastSuccessfulTime: - description: lastSuccessfulTime records the last time the backup - was successfully completed. + description: Records the last time the backup was successfully + completed. format: date-time type: string phase: - description: phase describes the phase of the schedule. + description: Describes the phase of the schedule. type: string type: object - description: schedules describes the status of each schedule. + description: Describes the status of each schedule. type: object type: object type: object diff --git a/config/crd/bases/dataprotection.kubeblocks.io_restores.yaml b/config/crd/bases/dataprotection.kubeblocks.io_restores.yaml index dc3e8bdcaa3..74a63229c83 100644 --- a/config/crd/bases/dataprotection.kubeblocks.io_restores.yaml +++ b/config/crd/bases/dataprotection.kubeblocks.io_restores.yaml @@ -67,19 +67,19 @@ spec: minimum: 0 type: integer backup: - description: "backup to be restored. The restore behavior based on - the backup type: \n 1. Full: will be restored the full backup directly. - 2. Incremental: will be restored sequentially from the most recent - full backup of this incremental backup. 3. Differential: will be - restored sequentially from the parent backup of the differential + description: "Specifies the backup to be restored. The restore behavior + is based on the backup type: \n 1. Full: will be restored the full + backup directly. 2. Incremental: will be restored sequentially from + the most recent full backup of this incremental backup. 3. Differential: + will be restored sequentially from the parent backup of the differential backup. 4. Continuous: will find the most recent full backup at this time point and the continuous backups after it to restore." properties: name: - description: backup name + description: Specifies the backup name. type: string namespace: - description: backup namespace + description: Specifies the backup namespace. type: string required: - name @@ -89,7 +89,7 @@ spec: - message: forbidden to update spec.backupName rule: self == oldSelf containerResources: - description: specified the required resources of restore job's container. + description: Specifies the required resources of restore job's container. properties: claims: description: "Claims lists the names of resources, defined in @@ -137,8 +137,8 @@ spec: type: object type: object env: - description: "list of environment variables to set in the container - for restore and will be merged with the env of Backup and ActionSet. + description: "List of environment variables to set in the container + for restore. These will be merged with the env of Backup and ActionSet. \n The priority of merging is as follows: `Restore env > Backup env > ActionSet env`." items: @@ -250,24 +250,23 @@ spec: type: array x-kubernetes-preserve-unknown-fields: true prepareDataConfig: - description: configuration for the action of "prepareData" phase, + description: Configuration for the action of "prepareData" phase, including the persistent volume claims that need to be restored and scheduling strategy of temporary recovery pod. properties: dataSourceRef: - description: dataSourceRef describes the configuration when using - `persistentVolumeClaim.spec.dataSourceRef` method for restoring. - it describes the source volume of the backup targetVolumes and - how to mount path in the restoring container. + description: Specifies the configuration when using `persistentVolumeClaim.spec.dataSourceRef` + method for restoring. Describes the source volume of the backup + targetVolumes and the mount path in the restoring container. properties: mountPath: - description: mountPath path within the restoring container + description: Specifies the path within the restoring container at which the volume should be mounted. type: string volumeSource: - description: volumeSource describes the volume will be restored - from the specified volume of the backup targetVolumes. required - if the backup uses volume snapshot. + description: Describes the volume that will be restored from + the specified volume of the backup targetVolumes. This is + required if the backup uses a volume snapshot. type: string type: object x-kubernetes-validations: @@ -276,11 +275,11 @@ spec: - message: forbidden to update spec.prepareDataConfig.dataSourceRef rule: self == oldSelf schedulingSpec: - description: scheduling spec for restoring pod. + description: Specifies the scheduling spec for the restoring pod. properties: affinity: - description: affinity is a group of affinity scheduling rules. - refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + description: Contains a group of affinity scheduling rules. + Refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ properties: nodeAffinity: description: Describes node affinity scheduling rules @@ -1182,7 +1181,7 @@ spec: type: object type: object nodeName: - description: nodeName is a request to schedule this pod onto + description: Specifies 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. @@ -1190,19 +1189,19 @@ spec: nodeSelector: additionalProperties: type: string - description: '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/' + description: 'Defines a selector which must be true for the + pod to fit on a node. The selector 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/' type: object x-kubernetes-map-type: atomic schedulerName: - description: If specified, the pod will be dispatched by specified - scheduler. If not specified, the pod will be dispatched - by default scheduler. + description: Specifies the scheduler to dispatch the pod. + If not specified, the pod will be dispatched by the default + scheduler. type: string tolerations: - description: the restoring pod's tolerations. + description: Specifies the tolerations for the restoring pod. items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using @@ -1244,10 +1243,9 @@ spec: type: object type: array topologySpreadConstraints: - description: 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/ + description: Describes how a group of pods ought to spread + across topology domains. The scheduler will schedule pods + in a way which abides by the constraints. Refer to https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ items: description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. @@ -1439,24 +1437,24 @@ spec: rule: self == oldSelf volumeClaimRestorePolicy: default: Parallel - description: "VolumeClaimRestorePolicy defines restore policy - for persistent volume claim. Supported policies are as follows: - \n 1. Parallel: parallel recovery of persistent volume claim. - 2. Serial: restore the persistent volume claim in sequence, - and wait until the previous persistent volume claim is restored - before restoring a new one." + description: "Defines restore policy for persistent volume claim. + Supported policies are as follows: \n - `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." enum: - Parallel - Serial type: string volumeClaims: - description: 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. + description: Defines the persistent Volume claims that need to + be restored and mounted together into the restore job. These + persistent Volume claims will be created if they do not exist. items: properties: metadata: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + description: 'Specifies the standard metadata for the object. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' properties: annotations: additionalProperties: @@ -1476,12 +1474,12 @@ spec: type: string type: object mountPath: - description: mountPath path within the restoring container + description: Specifies the path within the restoring container at which the volume should be mounted. type: string volumeClaimSpec: - description: volumeClaimSpec defines the desired characteristics - of a persistent volume claim. + description: Defines the desired characteristics of a persistent + volume claim. properties: accessModes: description: 'accessModes contains the desired access @@ -1700,9 +1698,9 @@ spec: type: string type: object volumeSource: - description: volumeSource describes the volume will be restored + description: Describes the volume that will be restored from the specified volume of the backup targetVolumes. - required if the backup uses volume snapshot. + This is required if the backup uses a volume snapshot. type: string required: - metadata @@ -1716,31 +1714,32 @@ spec: - message: forbidden to update spec.prepareDataConfig.volumeClaims rule: self == oldSelf volumeClaimsTemplate: - description: 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. + description: 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 + they already exist. properties: replicas: - description: the replicas of persistent volume claim which - need to be created and restored. the format of created claim - name is `$(template-name)-$(index)`. + description: Specifies the replicas of persistent volume claim + that need to be created and restored. The format of the + created claim name is `$(template-name)-$(index)`. format: int32 minimum: 1 type: integer startingIndex: - description: the starting index for the created persistent - volume claim by according to template. minimum is 0. + description: Specifies the starting index for the created + persistent volume claim according to the template. The minimum + value is 0. format: int32 minimum: 0 type: integer templates: - description: templates is a list of volume claims. + description: Contains a list of volume claims. items: properties: metadata: - description: 'Standard object''s metadata. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + description: 'Specifies the standard metadata for the + object. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' properties: annotations: additionalProperties: @@ -1760,12 +1759,12 @@ spec: type: string type: object mountPath: - description: mountPath path within the restoring container - at which the volume should be mounted. + description: Specifies the path within the restoring + container at which the volume should be mounted. type: string volumeClaimSpec: - description: volumeClaimSpec defines the desired characteristics - of a persistent volume claim. + description: Defines the desired characteristics of + a persistent volume claim. properties: accessModes: description: 'accessModes contains the desired access @@ -1997,10 +1996,9 @@ spec: type: string type: object volumeSource: - description: volumeSource describes the volume will - be restored from the specified volume of the backup - targetVolumes. required if the backup uses volume - snapshot. + description: Describes the volume that will be restored + from the specified volume of the backup targetVolumes. + This is required if the backup uses a volume snapshot. type: string required: - metadata @@ -2021,51 +2019,51 @@ spec: - volumeClaimRestorePolicy type: object readyConfig: - description: configuration for the action of "postReady" phase. + description: Configuration for the action of "postReady" phase. properties: connectionCredential: - description: credential template used for creating a connection - credential + description: Defines the credential template used to create a + connection credential. properties: hostKey: - description: hostKey specifies the map key of the host in - the connection credential secret. + description: Specifies the map key of the host in the connection + credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of the port in - the connection credential secret. + description: Specifies the map key of the port in the connection + credential secret. type: string secretName: - description: secretName refers to the Secret object that contains - the connection credential. + description: Refers to the Secret object that contains the + connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key of the user - in the connection credential secret. + description: Specifies the map key of the user in the connection + credential secret. type: string required: - secretName type: object execAction: - description: configuration for exec action. + description: Specifies the configuration for an exec action. properties: target: - description: execActionTarget defines the pods that need to - be executed for the exec action. will execute on all pods - that meet the conditions. + description: Defines the pods that need to be executed for + the exec action. Execution will occur on all pods that meet + the conditions. properties: podSelector: - description: kubectl exec in all selected pods. + description: Executes kubectl in all selected pods. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -2115,17 +2113,18 @@ spec: type: object type: object jobAction: - description: configuration for job action. + description: Specifies the configuration for a job action. properties: target: - description: jobActionTarget defines the pod that need to - be executed for the job action. will select a pod that meets - the conditions to execute. + description: Defines the pod that needs to be executed for + the job action. A pod that meets the conditions will be + selected for execution. properties: podSelector: - description: 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. + description: Selects one of the pods, identified by labels, + to build the job spec. This includes mounting required + volumes and injecting built-in environment variables + of the selected pod. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -2171,8 +2170,8 @@ spec: type: object x-kubernetes-map-type: atomic volumeMounts: - description: volumeMounts defines which volumes of the - selected pod need to be mounted on the restoring pod. + description: Defines which volumes of the selected pod + need to be mounted on the restoring pod. items: description: VolumeMount describes a mounting of a Volume within a container. @@ -2221,40 +2220,42 @@ spec: - target type: object readinessProbe: - description: periodic probe of the service readiness. controller - will perform postReadyHooks of BackupScript.spec.restore after - the service readiness when readinessProbe is configured. + description: Defines a periodic probe of the service readiness. + The controller will perform postReadyHooks of BackupScript.spec.restore + after the service readiness when readinessProbe is configured. properties: exec: - description: exec specifies the action to take. + description: Specifies the action to take. properties: command: - description: refer to container command. + description: Refers to the container command. items: type: string type: array image: - description: refer to container image. + description: Refers to the container image. type: string required: - command - image type: object initialDelaySeconds: - description: number of seconds after the container has started - before probe is initiated. + description: Specifies the number of seconds after the container + has started before the probe is initiated. minimum: 0 type: integer periodSeconds: default: 5 - description: how often (in seconds) to perform the probe. - defaults to 5 second, minimum value is 1. + description: Specifies how often (in seconds) to perform the + probe. The default value is 5 seconds, and the minimum value + is 1. minimum: 1 type: integer timeoutSeconds: default: 30 - description: number of seconds after which the probe times - out. defaults to 30 second, minimum value is 1. + description: Specifies the number of seconds after which the + probe times out. The default value is 30 seconds, and the + minimum value is 1. minimum: 1 type: integer required: @@ -2265,16 +2266,16 @@ spec: - message: at least one exists for jobAction and execAction. rule: has(self.jobAction) || has(self.execAction) resources: - description: restore the specified resources of kubernetes. + description: Restores the specified resources of Kubernetes. properties: included: - description: will restore the specified resources + description: Restores the specified resources. items: properties: groupResource: type: string labelSelector: - description: select the specified resource for recovery + description: Selects the specified resource for recovery by label. properties: matchExpressions: @@ -2329,14 +2330,15 @@ spec: - message: forbidden to update spec.resources rule: self == oldSelf restoreTime: - description: restoreTime is the point in time for restoring. + description: Specifies the point in time for restoring. pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$ type: string x-kubernetes-validations: - message: forbidden to update spec.restoreTime rule: self == oldSelf serviceAccountName: - description: service account name which needs for recovery pod. + description: Specifies the service account name needed for recovery + pod. type: string required: - backup @@ -2345,38 +2347,38 @@ spec: description: RestoreStatus defines the observed state of Restore properties: actions: - description: recorded all restore actions performed. + description: Records all restore actions performed. properties: postReady: - description: record the actions for postReady phase. + description: Records the actions for the postReady phase. items: properties: backupName: - description: which backup's restore action belongs to. + description: Describes which backup's restore action belongs + to. type: string endTime: - description: endTime is the completion time for the restore - job. + description: The completion time of the restore job. format: date-time type: string message: - description: message is a human-readable message indicating + description: Provides a human-readable message indicating details about the object condition. type: string name: - description: name describes the name of the recovery action - based on the current backup. + description: Describes the name of the restore action based + on the current backup. type: string objectKey: - description: the execution object of the restore action. + description: Describes the execution object of the restore + action. type: string startTime: - description: startTime is the start time for the restore - job. + description: The start time of the restore job. format: date-time type: string status: - description: the status of this action. + description: The status of this action. enum: - Processing - Completed @@ -2389,35 +2391,35 @@ spec: type: object type: array prepareData: - description: record the actions for prepareData phase. + description: Records the actions for the prepareData phase. items: properties: backupName: - description: which backup's restore action belongs to. + description: Describes which backup's restore action belongs + to. type: string endTime: - description: endTime is the completion time for the restore - job. + description: The completion time of the restore job. format: date-time type: string message: - description: message is a human-readable message indicating + description: Provides a human-readable message indicating details about the object condition. type: string name: - description: name describes the name of the recovery action - based on the current backup. + description: Describes the name of the restore action based + on the current backup. type: string objectKey: - description: the execution object of the restore action. + description: Describes the execution object of the restore + action. type: string startTime: - description: startTime is the start time for the restore - job. + description: The start time of the restore job. format: date-time type: string status: - description: the status of this action. + description: The status of this action. enum: - Processing - Completed @@ -2431,12 +2433,13 @@ spec: type: array type: object completionTimestamp: - description: Date/time when the restore finished being processed. + description: Records the date/time when the restore finished being + processed. format: date-time type: string conditions: - description: describe current state of restore API Resource, like - warning. + description: Describes the current state of the restore API Resource, + like warning. items: description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct @@ -2505,12 +2508,11 @@ spec: type: object type: array duration: - description: The duration time of restore execution. When converted + description: Records the duration of the restore execution. When converted to a string, the form is "1h2m0.5s". type: string phase: - description: RestorePhase The current phase. Valid values are Running, - Completed, Failed, AsDataSource. + description: Represents the current phase of the restore. enum: - Running - Completed @@ -2518,7 +2520,8 @@ spec: - AsDataSource type: string startTimestamp: - description: Date/time when the restore started being processed. + description: Records the date/time when the restore started being + processed. format: date-time type: string type: object diff --git a/deploy/helm/crds/apps.kubeblocks.io_backuppolicytemplates.yaml b/deploy/helm/crds/apps.kubeblocks.io_backuppolicytemplates.yaml index b7b4cfb0638..80c8d7c07b4 100644 --- a/deploy/helm/crds/apps.kubeblocks.io_backuppolicytemplates.yaml +++ b/deploy/helm/crds/apps.kubeblocks.io_backuppolicytemplates.yaml @@ -65,14 +65,14 @@ spec: items: properties: actionSetName: - description: 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. + description: 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. type: string env: - description: env specifies the environment variables for - the backup workload. + description: Specifies the environment variables for the + backup workload. items: description: EnvVar represents an environment variable present in a Container. @@ -254,16 +254,16 @@ spec: type: object type: array name: - description: the name of backup method. + description: The name of backup method. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string runtimeSettings: - description: runtimeSettings specifies runtime settings - for the backup workload container. + description: Specifies runtime settings for the backup + workload container. properties: resources: - description: 'resources specifies the resource required - by container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + description: 'Specifies the resource required by container. + More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' properties: claims: description: "Claims lists the names of resources, @@ -317,14 +317,14 @@ spec: type: object snapshotVolumes: default: false - description: 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. + description: Specifies whether to take snapshots of persistent + volumes. If true, the ActionSetName is not required, + the controller will use the CSI volume snapshotter to + create the snapshot. type: boolean target: - description: target specifies the target information to - back up, it will override the global target policy. + description: Specifies the target information to back + up, it will override the target in backup policy. properties: account: description: "Refers to spec.componentDef.systemAccounts.accounts[*].name @@ -336,35 +336,34 @@ spec: target secret." type: string connectionCredential: - description: connectionCredential specifies the connection - credential to connect to the target database cluster. + description: Specifies the connection credential to + connect to the target database cluster. properties: hostKey: - description: hostKey specifies the map key of - the host in the connection credential secret. + description: Specifies the map key of the host + in the connection credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of - the port in the connection credential secret. + description: Specifies the map key of the port + in the connection credential secret. type: string secretName: - description: secretName refers to the Secret object - that contains the connection credential. + description: Refers to the Secret object that + contains the connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key - of the user in the connection credential secret. + description: Specifies the map key of the user + in the connection credential secret. type: string required: - secretName @@ -395,9 +394,8 @@ spec: type: string type: object podSelector: - description: podSelector is used to find the target - pod. The volumes of the target pod will be backed - up. + description: Used to find the target pod. The volumes + of the target pod will be backed up. properties: matchExpressions: description: matchExpressions is a list of label @@ -444,11 +442,12 @@ spec: type: object strategy: default: Any - description: "strategy specifies the strategy - to select the target pod when multiple pods - are selected. Valid values are: \n - Any: select + description: "Specifies the strategy to select + the target pod when multiple pods are selected. + Valid values are: Any: select any one pod that + match the labelsSelector. \n - `Any`: select any one pod that match the labelsSelector. - - All: select all pods that match the labelsSelector." + `All`: select all pods that match the labelsSelector." enum: - Any - All @@ -456,8 +455,8 @@ spec: type: object x-kubernetes-map-type: atomic resources: - description: resources specifies the kubernetes resources - to back up. + description: Specifies the kubernetes resources to + back up. properties: excluded: description: excluded is a slice of namespaced-scoped @@ -467,20 +466,17 @@ spec: type: string type: array included: - default: - - '*' description: 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. + resources. The default value is empty. items: type: string type: array selector: - description: 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. + description: 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. properties: matchExpressions: description: matchExpressions is a list of @@ -545,8 +541,8 @@ spec: the BackupPolicy's target attribute." type: string serviceAccountName: - description: serviceAccountName specifies the service - account to run the backup workload. + description: Specifies the service account to run + the backup workload. type: string strategy: description: "Specifies the PodSelectionStrategy to @@ -562,12 +558,12 @@ spec: - role type: object targetVolumes: - description: targetVolumes specifies which volumes from - the target should be mounted in the backup workload. + description: Specifies which volumes from the target should + be mounted in the backup workload. properties: volumeMounts: - description: volumeMounts specifies the mount for - the volumes specified in `Volumes` section. + description: Specifies the mount for the volumes specified + in `volumes` section. items: description: VolumeMount describes a mounting of a Volume within a container. @@ -611,9 +607,9 @@ spec: type: object type: array volumes: - description: Volumes indicates the list of volumes - of targeted application that should be mounted on - the backup job. + description: Specifies the list of volumes of targeted + application that should be mounted on the backup + workload. items: type: string type: array diff --git a/deploy/helm/crds/dataprotection.kubeblocks.io_actionsets.yaml b/deploy/helm/crds/dataprotection.kubeblocks.io_actionsets.yaml index 8e587fedb29..be79fcc1e0d 100644 --- a/deploy/helm/crds/dataprotection.kubeblocks.io_actionsets.yaml +++ b/deploy/helm/crds/dataprotection.kubeblocks.io_actionsets.yaml @@ -50,49 +50,49 @@ spec: description: ActionSetSpec defines the desired state of ActionSet properties: backup: - description: backup specifies the backup action. + description: Specifies the backup action. properties: backupData: - description: backupData specifies the backup data action. + description: Represents the action to be performed for backing + up data. properties: command: - description: command specifies the commands to back up the - volume data. + description: Defines the commands to back up the volume data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string onError: default: Fail - description: OnError specifies how should behave if it encounters - an error executing this action. + description: Indicates how to behave if an error is encountered + during the execution of this action. enum: - Continue - Fail type: string runOnTargetPodNode: default: false - description: 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. + description: Determines whether to run the job workload on + the target pod node. If the backup container needs to mount + the target pod's volumes, this field should be set to true. + Otherwise, the target pod's volumes will be ignored. type: boolean syncProgress: - description: syncProgress specifies whether to sync the backup - progress and its interval seconds. + description: Determines if the backup progress should be synchronized + and the interval for synchronization in seconds. properties: enabled: - description: 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. + description: Determines if the backup progress should + be synchronized. If set to true, a sidecar container + will be instantiated to synchronize the backup progress + with the Backup Custom Resource (CR) status. type: boolean intervalSeconds: default: 60 - description: intervalSeconds specifies the interval seconds - to sync the backup progress. + description: Defines the interval in seconds for synchronizing + the backup progress. format: int32 type: integer type: object @@ -101,72 +101,72 @@ spec: - image type: object postBackup: - description: postBackup specifies a hook that should be executed - after the backup. + description: Represents a set of actions that should be executed + after the backup process has completed. items: description: ActionSpec defines an action that should be executed. Only one of the fields may be set. properties: exec: - description: exec specifies the action should be executed - by the pod exec API in a container. + description: Specifies that the action should be executed + using the pod's exec API within a container. properties: command: - description: Command is the command and arguments to - execute. + description: Defines the command and arguments to be + executed. items: type: string minItems: 1 type: array container: - description: container is the container in the pod where - the command should be executed. If not specified, - the pod's first container is used. + description: Specifies the container within the pod + where the command should be executed. If not specified, + the first container in the pod is used by default. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string timeout: - description: Timeout defines the maximum amount of time - should wait for the hook to complete before considering - the execution a failure. + description: Specifies the maximum duration to wait + for the hook to complete before considering the execution + a failure. type: string required: - command type: object job: - description: job specifies the action should be executed + description: Specifies that the action should be executed by a Kubernetes Job. properties: command: - description: command specifies the commands to back - up the volume data. + description: Defines the commands to back up the volume + data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string runOnTargetPodNode: default: false - description: 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. + description: Determines whether to run the job workload + on the target pod node. If the backup container needs + to mount the target pod's volumes, this field should + be set to true. Otherwise, the target pod's volumes + will be ignored. type: boolean required: - command @@ -175,72 +175,72 @@ spec: type: object type: array preBackup: - description: preBackup specifies a hook that should be executed - before the backup. + description: Represents a set of actions that should be executed + before the backup process begins. items: description: ActionSpec defines an action that should be executed. Only one of the fields may be set. properties: exec: - description: exec specifies the action should be executed - by the pod exec API in a container. + description: Specifies that the action should be executed + using the pod's exec API within a container. properties: command: - description: Command is the command and arguments to - execute. + description: Defines the command and arguments to be + executed. items: type: string minItems: 1 type: array container: - description: container is the container in the pod where - the command should be executed. If not specified, - the pod's first container is used. + description: Specifies the container within the pod + where the command should be executed. If not specified, + the first container in the pod is used by default. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string timeout: - description: Timeout defines the maximum amount of time - should wait for the hook to complete before considering - the execution a failure. + description: Specifies the maximum duration to wait + for the hook to complete before considering the execution + a failure. type: string required: - command type: object job: - description: job specifies the action should be executed + description: Specifies that the action should be executed by a Kubernetes Job. properties: command: - description: command specifies the commands to back - up the volume data. + description: Defines the commands to back up the volume + data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string runOnTargetPodNode: default: false - description: 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. + description: Determines whether to run the job workload + on the target pod node. If the backup container needs + to mount the target pod's volumes, this field should + be set to true. Otherwise, the target pod's volumes + will be ignored. type: boolean required: - command @@ -249,18 +249,17 @@ spec: type: object type: array preDelete: - description: 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. + description: 'Represents a custom deletion action that can be + executed before the built-in deletion action. Note: The preDelete + action job will ignore the env/envFrom.' properties: command: - description: command specifies the commands to back up the - volume data. + description: Defines the commands to back up the volume data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string required: - command @@ -280,16 +279,17 @@ spec: - Differential - Continuous default: Full - description: "backupType specifies the backup type, supported values: - \n - `Full` means full backup. - `Incremental` means back up data - that have changed since the last backup (full or incremental). - - `Differential` means back up data that have changed since the last - full backup. - `Continuous` will back up the transaction log continuously, - the PITR (Point in Time Recovery) can be performed based on the - continuous backup and full backup." + description: "Specifies the backup type. Supported values include: + \n - `Full` for a full backup. - `Incremental` back up data that + have changed since the last backup (either full or incremental). + - `Differential` back up data that has changed since the last full + backup. - `Continuous` back up transaction logs continuously, such + as MySQL binlog, PostgreSQL WAL, etc. \n Continuous backup is essential + for implementing Point-in-Time Recovery (PITR)." type: string env: - description: List of environment variables to set in the container. + description: Specifies a list of environment variables to be set in + the container. items: description: EnvVar represents an environment variable present in a Container. @@ -399,12 +399,12 @@ spec: type: array x-kubernetes-preserve-unknown-fields: true envFrom: - description: 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. + description: "Specifies a list of sources to populate environment + variables in the container. The keys within a source must be a C_IDENTIFIER. + Any invalid keys will be reported as an event when the container + starts. If a key exists in multiple sources, the value from the + last source will take precedence. Any values defined by an Env with + a duplicate key will take precedence. \n This field cannot be updated." items: description: EnvFromSource represents the source of a set of ConfigMaps properties: @@ -440,75 +440,75 @@ spec: type: array x-kubernetes-preserve-unknown-fields: true restore: - description: restore specifies the restore action. + description: Specifies the restore action. properties: postReady: - description: postReady specifies the action to execute after the - data is ready. + description: Specifies the actions that should be executed after + the data has been prepared and is ready for restoration. items: description: ActionSpec defines an action that should be executed. Only one of the fields may be set. properties: exec: - description: exec specifies the action should be executed - by the pod exec API in a container. + description: Specifies that the action should be executed + using the pod's exec API within a container. properties: command: - description: Command is the command and arguments to - execute. + description: Defines the command and arguments to be + executed. items: type: string minItems: 1 type: array container: - description: container is the container in the pod where - the command should be executed. If not specified, - the pod's first container is used. + description: Specifies the container within the pod + where the command should be executed. If not specified, + the first container in the pod is used by default. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string timeout: - description: Timeout defines the maximum amount of time - should wait for the hook to complete before considering - the execution a failure. + description: Specifies the maximum duration to wait + for the hook to complete before considering the execution + a failure. type: string required: - command type: object job: - description: job specifies the action should be executed + description: Specifies that the action should be executed by a Kubernetes Job. properties: command: - description: command specifies the commands to back - up the volume data. + description: Defines the commands to back up the volume + data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string onError: default: Fail - description: OnError specifies how should behave if - it encounters an error executing this action. + description: Indicates how to behave if an error is + encountered during the execution of this action. enum: - Continue - Fail type: string runOnTargetPodNode: default: false - description: 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. + description: Determines whether to run the job workload + on the target pod node. If the backup container needs + to mount the target pod's volumes, this field should + be set to true. Otherwise, the target pod's volumes + will be ignored. type: boolean required: - command @@ -517,32 +517,31 @@ spec: type: object type: array prepareData: - description: prepareData specifies the action to prepare data. + description: Specifies the action required to prepare data for + restoration. properties: command: - description: command specifies the commands to back up the - volume data. + description: Defines the commands to back up the volume data. items: type: string type: array image: - description: image specifies the image of backup container. + description: Specifies the image of the backup container. type: string onError: default: Fail - description: OnError specifies how should behave if it encounters - an error executing this action. + description: Indicates how to behave if an error is encountered + during the execution of this action. enum: - Continue - Fail type: string runOnTargetPodNode: default: false - description: 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. + description: Determines whether to run the job workload on + the target pod node. If the backup container needs to mount + the target pod's volumes, this field should be set to true. + Otherwise, the target pod's volumes will be ignored. type: boolean required: - command @@ -556,15 +555,17 @@ spec: description: ActionSetStatus defines the observed state of ActionSet properties: message: - description: A human-readable message indicating details about why - the ActionSet is in this phase. + description: Provides a human-readable explanation detailing the reason + for the current phase of the ActionSet. type: string observedGeneration: - description: generation number + description: Represents the generation number that has been observed + by the controller. format: int64 type: integer phase: - description: phase - in list of [Available,Unavailable] + description: Indicates the phase of the ActionSet. This can be either + 'Available' or 'Unavailable'. enum: - Available - Unavailable diff --git a/deploy/helm/crds/dataprotection.kubeblocks.io_backuppolicies.yaml b/deploy/helm/crds/dataprotection.kubeblocks.io_backuppolicies.yaml index e4e7072d2ff..01d85fd4d93 100644 --- a/deploy/helm/crds/dataprotection.kubeblocks.io_backuppolicies.yaml +++ b/deploy/helm/crds/dataprotection.kubeblocks.io_backuppolicies.yaml @@ -51,25 +51,25 @@ spec: properties: backoffLimit: description: Specifies the number of retries before marking the backup - failed. + as failed. format: int32 maximum: 10 minimum: 0 type: integer backupMethods: - description: backupMethods defines the backup methods. + description: Defines the backup methods. items: description: BackupMethod defines the backup method. properties: actionSetName: - description: 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. + description: 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. type: string env: - description: env specifies the environment variables for the - backup workload. + description: Specifies the environment variables for the backup + workload. items: description: EnvVar represents an environment variable present in a Container. @@ -187,16 +187,16 @@ spec: type: object type: array name: - description: the name of backup method. + description: The name of backup method. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string runtimeSettings: - description: runtimeSettings specifies runtime settings for - the backup workload container. + description: Specifies runtime settings for the backup workload + container. properties: resources: - description: 'resources specifies the resource required - by container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + description: 'Specifies the resource required by container. + More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' properties: claims: description: "Claims lists the names of resources, defined @@ -248,51 +248,50 @@ spec: type: object snapshotVolumes: default: false - description: 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. + description: Specifies whether to take snapshots of persistent + volumes. If true, the ActionSetName is not required, the controller + will use the CSI volume snapshotter to create the snapshot. type: boolean target: - description: target specifies the target information to back - up, it will override the global target policy. + description: Specifies the target information to back up, it + will override the target in backup policy. properties: connectionCredential: - description: connectionCredential specifies the connection - credential to connect to the target database cluster. + description: Specifies the connection credential to connect + to the target database cluster. properties: hostKey: - description: hostKey specifies the map key of the host - in the connection credential secret. + description: Specifies the map key of the host in the + connection credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of the port - in the connection credential secret. + description: Specifies the map key of the port in the + connection credential secret. type: string secretName: - description: secretName refers to the Secret object - that contains the connection credential. + description: Refers to the Secret object that contains + the connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key of the - user in the connection credential secret. + description: Specifies the map key of the user in the + connection credential secret. type: string required: - secretName type: object podSelector: - description: podSelector is used to find the target pod. - The volumes of the target pod will be backed up. + description: Used to find the target pod. The volumes of + the target pod will be backed up. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -337,11 +336,11 @@ spec: type: object strategy: default: Any - description: "strategy specifies the strategy to select - the target pod when multiple pods are selected. Valid - values are: \n - Any: select any one pod that match - the labelsSelector. - All: select all pods that match - the labelsSelector." + description: "Specifies the strategy to select the target + pod when multiple pods are selected. Valid values + are: Any: select any one pod that match the labelsSelector. + \n - `Any`: select any one pod that match the labelsSelector. + - `All`: select all pods that match the labelsSelector." enum: - Any - All @@ -349,8 +348,8 @@ spec: type: object x-kubernetes-map-type: atomic resources: - description: resources specifies the kubernetes resources - to back up. + description: Specifies the kubernetes resources to back + up. properties: excluded: description: excluded is a slice of namespaced-scoped @@ -360,20 +359,16 @@ spec: type: string type: array included: - default: - - '*' description: 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. + The default value is empty. items: type: string type: array selector: - description: 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. + description: 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. properties: matchExpressions: description: matchExpressions is a list of label @@ -421,17 +416,17 @@ spec: x-kubernetes-map-type: atomic type: object serviceAccountName: - description: serviceAccountName specifies the service account - to run the backup workload. + description: Specifies the service account to run the backup + workload. type: string type: object targetVolumes: - description: targetVolumes specifies which volumes from the - target should be mounted in the backup workload. + description: Specifies which volumes from the target should + be mounted in the backup workload. properties: volumeMounts: - description: volumeMounts specifies the mount for the volumes - specified in `Volumes` section. + description: Specifies the mount for the volumes specified + in `volumes` section. items: description: VolumeMount describes a mounting of a Volume within a container. @@ -472,8 +467,8 @@ spec: type: object type: array volumes: - description: Volumes indicates the list of volumes of targeted - application that should be mounted on the backup job. + description: Specifies the list of volumes of targeted application + that should be mounted on the backup workload. items: type: string type: array @@ -483,55 +478,56 @@ spec: type: object type: array backupRepoName: - description: 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. + description: Specifies the name of BackupRepo where the backup data + will be stored. If not set, data will be stored in the default backup + repository. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string pathPrefix: - description: pathPrefix is the directory inside the backup repository - to store the backup content. It is a relative to the path of the - backup repository. + description: Specifies the directory inside the backup repository + to store the backup. This path is relative to the path of the backup + repository. type: string target: - description: target specifies the target information to back up. + description: Specifies the target information to back up, such as + the target pod, the cluster connection credential. properties: connectionCredential: - description: connectionCredential specifies the connection credential - to connect to the target database cluster. + description: Specifies the connection credential to connect to + the target database cluster. properties: hostKey: - description: hostKey specifies the map key of the host in - the connection credential secret. + description: Specifies the map key of the host in the connection + credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of the port in - the connection credential secret. + description: Specifies the map key of the port in the connection + credential secret. type: string secretName: - description: secretName refers to the Secret object that contains - the connection credential. + description: Refers to the Secret object that contains the + connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key of the user - in the connection credential secret. + description: Specifies the map key of the user in the connection + credential secret. type: string required: - secretName type: object podSelector: - description: podSelector is used to find the target pod. The volumes - of the target pod will be backed up. + description: Used to find the target pod. The volumes of the target + pod will be backed up. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -575,10 +571,11 @@ spec: type: object strategy: default: Any - description: "strategy specifies the strategy to select the - target pod when multiple pods are selected. Valid values - are: \n - Any: select any one pod that match the labelsSelector. - - All: select all pods that match the labelsSelector." + description: "Specifies the strategy to select the target + pod when multiple pods are selected. Valid values are: Any: + select any one pod that match the labelsSelector. \n - `Any`: + select any one pod that match the labelsSelector. - `All`: + select all pods that match the labelsSelector." enum: - Any - All @@ -586,8 +583,7 @@ spec: type: object x-kubernetes-map-type: atomic resources: - description: resources specifies the kubernetes resources to back - up. + description: Specifies the kubernetes resources to back up. properties: excluded: description: excluded is a slice of namespaced-scoped resource @@ -597,18 +593,16 @@ spec: type: string type: array included: - default: - - '*' description: 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. + value is empty. items: type: string type: array selector: - description: 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. + description: 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. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -655,16 +649,15 @@ spec: x-kubernetes-map-type: atomic type: object serviceAccountName: - description: serviceAccountName specifies the service account - to run the backup workload. + description: Specifies the service account to run the backup workload. type: string type: object useKopia: default: false - description: "useKopia specifies whether backup data should be stored - in a Kopia repository. \n 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 + description: "Specifies whether backup data should be stored in a + Kopia repository. \n 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. \n NOTE: This feature should NOT be enabled when using KubeBlocks Community Edition, otherwise the backup will @@ -682,13 +675,13 @@ spec: the BackupPolicy is in this phase. type: string observedGeneration: - description: observedGeneration is the most recent generation observed + description: 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. format: int64 type: integer phase: - description: phase - in list of [Available,Unavailable] + description: Phase - in list of [Available,Unavailable] enum: - Available - Unavailable diff --git a/deploy/helm/crds/dataprotection.kubeblocks.io_backups.yaml b/deploy/helm/crds/dataprotection.kubeblocks.io_backups.yaml index 5cbaccd1b54..d799b251cbb 100644 --- a/deploy/helm/crds/dataprotection.kubeblocks.io_backups.yaml +++ b/deploy/helm/crds/dataprotection.kubeblocks.io_backups.yaml @@ -66,14 +66,14 @@ spec: description: BackupSpec defines the desired state of Backup. properties: backupMethod: - description: backupMethod specifies the backup method name that is - defined in backupPolicy. + description: Specifies the backup method name that is defined in the + backup policy. type: string x-kubernetes-validations: - message: forbidden to update spec.backupMethod rule: self == oldSelf backupPolicyName: - description: Which backupPolicy is applied to perform this backup. + description: Specifies the backup policy to be applied for this backup. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string x-kubernetes-validations: @@ -88,32 +88,32 @@ spec: - Delete - Retain default: Delete - description: "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`. - \n - `Retain` means that the backup content and its physical snapshot - on backup repository are kept. - `Delete` means that the backup - content and its physical snapshot on backup repository are deleted. - \n TODO: for the retain policy, we should support in the future - for only deleting the backup custom objects but retaining the backup - contents in backup repository. The current implementation only prevent - accidental deletion of backup data." + description: "Determines whether the backup contents stored in the + backup repository should be deleted when the backup custom resource(CR) + is deleted. Supported values are `Retain` and `Delete`. \n - `Retain` + means that the backup content and its physical snapshot on backup + repository are kept. - `Delete` means that the backup content and + its physical snapshot on backup repository are deleted. \n TODO: + for the retain policy, we should support in the future for only + deleting the backup CR but retaining the backup contents in backup + repository. The current implementation only prevent accidental deletion + of backup data." type: string parentBackupName: - description: parentBackupName determines the parent backup name for - incremental or differential backup. + description: Determines the parent backup name for incremental or + differential backup. type: string x-kubernetes-validations: - message: forbidden to update spec.parentBackupName rule: self == oldSelf retentionPeriod: - description: "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 - `30d` will keep only the backups of last 30 days. Sample duration - format: \n - years: \t2y - months: \t6mo - days: \t\t30d - hours: - \t12h - minutes: \t30m \n You can also combine the above durations. - For example: 30d12h30m. If not set, the backup will be kept forever." + description: "Determines a duration up to which the backup should + be kept. Controller will remove all backups that are older than + the RetentionPeriod. If not set, the backup will be kept forever. + For example, RetentionPeriod of `30d` will keep only the backups + of last 30 days. Sample duration format: \n - years: \t2y - months: + \t6mo - days: \t\t30d - hours: \t12h - minutes: \t30m \n You can + also combine the above durations. For example: 30d12h30m." type: string required: - backupMethod @@ -123,31 +123,28 @@ spec: description: BackupStatus defines the observed state of Backup. properties: actions: - description: actions records the actions information for this backup. + description: Records the actions status for this backup. items: properties: actionType: - description: actionType is the type of the action. + description: The type of the action. type: string availableReplicas: - description: availableReplicas available replicas for statefulSet - action. + description: Available replicas for statefulSet action. format: int32 type: integer completionTimestamp: - description: completionTimestamp records the time an action - was completed. + description: Records the time an action was completed. format: date-time type: string failureReason: - description: failureReason is an error that caused the backup - to fail. + description: An error that caused the action to fail. type: string name: - description: name is the name of the action. + description: The name of the action. type: string objectRef: - description: objectRef is the object reference for the action. + description: The object reference for the action. properties: apiVersion: description: API version of the referent. @@ -185,71 +182,69 @@ spec: type: object x-kubernetes-map-type: atomic phase: - description: phase is the current state of the action. + description: The current phase of the action. type: string startTimestamp: - description: startTimestamp records the time an action was started. + description: Records the time an action was started. format: date-time type: string timeRange: - description: timeRange records the time range of backed up data, - for PITR, this is the time range of recoverable data. + description: Records the time range of backed up data, for PITR, + this is the time range of recoverable data. properties: end: - description: end records the end time of backup(Coordinated - Universal Time, UTC). + description: Records the end time of the backup, in Coordinated + Universal Time (UTC). format: date-time type: string start: - description: start records the start time of backup(Coordinated - Universal Time, UTC). + description: Records the start time of the backup, in Coordinated + Universal Time (UTC). format: date-time type: string timeZone: - description: 'time zone, only support zone offset, value - range: "-12:59 ~ +13:00"' + description: time zone, supports only zone offset, with + a value range of "-12:59 ~ +13:00". pattern: ^(\+|\-)(0[0-9]|1[0-3]):([0-5][0-9])$ type: string type: object totalSize: - description: totalSize is the total size of backed up data size. - A string with capacity units in the format of "1Gi", "1Mi", - "1Ki". + description: 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. type: string volumeSnapshots: - description: volumeSnapshots records the volume snapshot status - for the action. + description: Records the volume snapshot status for the action. items: properties: contentName: - description: contentName is the name of the volume snapshot - content. + description: The name of the volume snapshot content. type: string name: - description: name is the name of the volume snapshot. + description: The name of the volume snapshot. type: string size: - description: size is the size of the volume snapshot. + description: The size of the volume snapshot. type: string volumeName: - description: volumeName is the name of the volume. + description: The name of the volume. type: string type: object type: array type: object type: array backupMethod: - description: backupMethod records the backup method information for - this backup. Refer to BackupMethod for more details. + description: Records the backup method information for this backup. + Refer to BackupMethod for more details. properties: actionSetName: - description: 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. + description: 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. type: string env: - description: env specifies the environment variables for the backup + description: Specifies the environment variables for the backup workload. items: description: EnvVar represents an environment variable present @@ -364,16 +359,16 @@ spec: type: object type: array name: - description: the name of backup method. + description: The name of backup method. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string runtimeSettings: - description: runtimeSettings specifies runtime settings for the - backup workload container. + description: Specifies runtime settings for the backup workload + container. properties: resources: - description: 'resources specifies the resource required by - container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + description: 'Specifies the resource required by container. + More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' properties: claims: description: "Claims lists the names of resources, defined @@ -424,51 +419,50 @@ spec: type: object snapshotVolumes: default: false - description: 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. + description: Specifies whether to take snapshots of persistent + volumes. If true, the ActionSetName is not required, the controller + will use the CSI volume snapshotter to create the snapshot. type: boolean target: - description: target specifies the target information to back up, - it will override the global target policy. + description: Specifies the target information to back up, it will + override the target in backup policy. properties: connectionCredential: - description: connectionCredential specifies the connection - credential to connect to the target database cluster. + description: Specifies the connection credential to connect + to the target database cluster. properties: hostKey: - description: hostKey specifies the map key of the host - in the connection credential secret. + description: Specifies the map key of the host in the + connection credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of the port - in the connection credential secret. + description: Specifies the map key of the port in the + connection credential secret. type: string secretName: - description: secretName refers to the Secret object that - contains the connection credential. + description: Refers to the Secret object that contains + the connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key of the - user in the connection credential secret. + description: Specifies the map key of the user in the + connection credential secret. type: string required: - secretName type: object podSelector: - description: podSelector is used to find the target pod. The - volumes of the target pod will be backed up. + description: Used to find the target pod. The volumes of the + target pod will be backed up. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -513,11 +507,11 @@ spec: type: object strategy: default: Any - description: "strategy specifies the strategy to select - the target pod when multiple pods are selected. Valid - values are: \n - Any: select any one pod that match - the labelsSelector. - All: select all pods that match - the labelsSelector." + description: "Specifies the strategy to select the target + pod when multiple pods are selected. Valid values are: + Any: select any one pod that match the labelsSelector. + \n - `Any`: select any one pod that match the labelsSelector. + - `All`: select all pods that match the labelsSelector." enum: - Any - All @@ -525,8 +519,7 @@ spec: type: object x-kubernetes-map-type: atomic resources: - description: resources specifies the kubernetes resources - to back up. + description: Specifies the kubernetes resources to back up. properties: excluded: description: excluded is a slice of namespaced-scoped @@ -536,19 +529,16 @@ spec: type: string type: array included: - default: - - '*' description: 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. + The default value is empty. items: type: string type: array selector: - description: 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. + description: 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. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -595,17 +585,17 @@ spec: x-kubernetes-map-type: atomic type: object serviceAccountName: - description: serviceAccountName specifies the service account - to run the backup workload. + description: Specifies the service account to run the backup + workload. type: string type: object targetVolumes: - description: targetVolumes specifies which volumes from the target - should be mounted in the backup workload. + description: Specifies which volumes from the target should be + mounted in the backup workload. properties: volumeMounts: - description: volumeMounts specifies the mount for the volumes - specified in `Volumes` section. + description: Specifies the mount for the volumes specified + in `volumes` section. items: description: VolumeMount describes a mounting of a Volume within a container. @@ -646,8 +636,8 @@ spec: type: object type: array volumes: - description: Volumes indicates the list of volumes of targeted - application that should be mounted on the backup job. + description: Specifies the list of volumes of targeted application + that should be mounted on the backup workload. items: type: string type: array @@ -656,52 +646,52 @@ spec: - name type: object backupRepoName: - description: backupRepoName is the name of the backup repository. + description: The name of the backup repository. type: string completionTimestamp: - description: completionTimestamp records the time a backup was completed. - Completion time is recorded even on failed backups. The server's - time is used for CompletionTimestamp. + description: Records the time when the backup operation was completed. + This timestamp is recorded even if the backup operation fails. The + server's time is used for this timestamp. format: date-time type: string duration: - description: The duration time of backup execution. When converted + description: Records the duration of the backup operation. When converted to a string, the format is "1h2m0.5s". type: string expiration: - description: expiration is when this backup is eligible for garbage - collection. 'null' means the Backup will NOT be cleaned except delete - manual. + description: Indicates when this backup becomes eligible for garbage + collection. A 'null' value implies that the backup will not be cleaned + up unless manually deleted. format: date-time type: string extras: - description: extra records the extra info for the backup. + description: Records any additional information for the backup. items: additionalProperties: type: string type: object type: array failureReason: - description: failureReason is an error that caused the backup to fail. + description: Any error that caused the backup operation to fail. type: string formatVersion: - description: formatVersion is the backup format version, including - major, minor and patch version. + description: Specifies the backup format version, which includes major, + minor, and patch versions. type: string kopiaRepoPath: - description: kopiaRepoPath records the path of the Kopia repository. + description: Records the path of the Kopia repository. type: string path: - description: path is the directory inside the backup repository where - the backup data is stored. It is an absolute path in the backup + description: The directory within the backup repository where the + backup data is stored. This is an absolute path within the backup repository. type: string persistentVolumeClaimName: - description: persistentVolumeClaimName is the name of the persistent - volume claim that is used to store the backup data. + description: Records the name of the persistent volume claim used + to store the backup data. type: string phase: - description: phase is the current state of the Backup. + description: Indicates the current state of the backup operation. enum: - New - InProgress @@ -711,49 +701,49 @@ spec: - Deleting type: string startTimestamp: - description: startTimestamp records the time a backup was started. - The server's time is used for StartTimestamp. + description: Records the time when the backup operation was started. + The server's time is used for this timestamp. format: date-time type: string target: - description: target records the target information for this backup. + description: Records the target information for this backup. properties: connectionCredential: - description: connectionCredential specifies the connection credential - to connect to the target database cluster. + description: Specifies the connection credential to connect to + the target database cluster. properties: hostKey: - description: hostKey specifies the map key of the host in - the connection credential secret. + description: Specifies the map key of the host in the connection + credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of the port in - the connection credential secret. + description: Specifies the map key of the port in the connection + credential secret. type: string secretName: - description: secretName refers to the Secret object that contains - the connection credential. + description: Refers to the Secret object that contains the + connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key of the user - in the connection credential secret. + description: Specifies the map key of the user in the connection + credential secret. type: string required: - secretName type: object podSelector: - description: podSelector is used to find the target pod. The volumes - of the target pod will be backed up. + description: Used to find the target pod. The volumes of the target + pod will be backed up. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -797,10 +787,11 @@ spec: type: object strategy: default: Any - description: "strategy specifies the strategy to select the - target pod when multiple pods are selected. Valid values - are: \n - Any: select any one pod that match the labelsSelector. - - All: select all pods that match the labelsSelector." + description: "Specifies the strategy to select the target + pod when multiple pods are selected. Valid values are: Any: + select any one pod that match the labelsSelector. \n - `Any`: + select any one pod that match the labelsSelector. - `All`: + select all pods that match the labelsSelector." enum: - Any - All @@ -808,8 +799,7 @@ spec: type: object x-kubernetes-map-type: atomic resources: - description: resources specifies the kubernetes resources to back - up. + description: Specifies the kubernetes resources to back up. properties: excluded: description: excluded is a slice of namespaced-scoped resource @@ -819,18 +809,16 @@ spec: type: string type: array included: - default: - - '*' description: 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. + value is empty. items: type: string type: array selector: - description: 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. + description: 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. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -877,52 +865,50 @@ spec: x-kubernetes-map-type: atomic type: object serviceAccountName: - description: serviceAccountName specifies the service account - to run the backup workload. + description: Specifies the service account to run the backup workload. type: string type: object timeRange: - description: timeRange records the time range of backed up data, for - PITR, this is the time range of recoverable data. + description: Records the time range of the data backed up. For Point-in-Time + Recovery (PITR), this is the time range of recoverable data. properties: end: - description: end records the end time of backup(Coordinated Universal - Time, UTC). + description: Records the end time of the backup, in Coordinated + Universal Time (UTC). format: date-time type: string start: - description: start records the start time of backup(Coordinated - Universal Time, UTC). + description: Records the start time of the backup, in Coordinated + Universal Time (UTC). format: date-time type: string timeZone: - description: 'time zone, only support zone offset, value range: - "-12:59 ~ +13:00"' + description: time zone, supports only zone offset, with a value + range of "-12:59 ~ +13:00". pattern: ^(\+|\-)(0[0-9]|1[0-3]):([0-5][0-9])$ type: string type: object totalSize: - description: 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. + description: Records the total size of the data backed up. The size + is represented as 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. type: string volumeSnapshots: - description: volumeSnapshots records the volume snapshot status for - the action. + description: Records the volume snapshot status for the action. items: properties: contentName: - description: contentName is the name of the volume snapshot - content. + description: The name of the volume snapshot content. type: string name: - description: name is the name of the volume snapshot. + description: The name of the volume snapshot. type: string size: - description: size is the size of the volume snapshot. + description: The size of the volume snapshot. type: string volumeName: - description: volumeName is the name of the volume. + description: The name of the volume. type: string type: object type: array diff --git a/deploy/helm/crds/dataprotection.kubeblocks.io_backupschedules.yaml b/deploy/helm/crds/dataprotection.kubeblocks.io_backupschedules.yaml index be1f4f0807c..bb79927c1c9 100644 --- a/deploy/helm/crds/dataprotection.kubeblocks.io_backupschedules.yaml +++ b/deploy/helm/crds/dataprotection.kubeblocks.io_backupschedules.yaml @@ -47,34 +47,34 @@ spec: description: BackupScheduleSpec defines the desired state of BackupSchedule. properties: backupPolicyName: - description: Which backupPolicy is applied to perform this backup. + description: Specifies the backupPolicy to be applied for the `schedules`. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string schedules: - description: schedules defines the list of backup schedules. + description: Defines the list of backup schedules. items: properties: backupMethod: - description: backupMethod specifies the backup method name that - is defined in backupPolicy. + description: Specifies the backup method name that is defined + in backupPolicy. type: string cronExpression: - description: the cron expression for schedule, the timezone - is in UTC. see https://en.wikipedia.org/wiki/Cron. + description: Specifies the cron expression for the schedule. + The timezone is in UTC. see https://en.wikipedia.org/wiki/Cron. type: string enabled: - description: enabled specifies whether the backup schedule is - enabled or not. + description: Specifies whether the backup schedule is enabled + or not. type: boolean retentionPeriod: default: 7d - description: "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 `30d` will keep only the backups of last 30 days. Sample - duration format: \n - years: \t2y - months: \t6mo - days: - \t\t30d - hours: \t12h - minutes: \t30m \n You can also combine - the above durations. For example: 30d12h30m" + description: "Determines the duration for which the backup should + be kept. KubeBlocks will remove all backups that are older + than the RetentionPeriod. For example, RetentionPeriod of + `30d` will keep only the backups of last 30 days. Sample duration + format: \n - years: \t2y - months: \t6mo - days: \t\t30d - + hours: \t12h - minutes: \t30m \n You can also combine the + above durations. For example: 30d12h30m" type: string required: - backupMethod @@ -83,9 +83,8 @@ spec: minItems: 1 type: array startingDeadlineMinutes: - description: startingDeadlineMinutes defines the deadline in minutes - for starting the backup workload if it misses scheduled time for - any reason. + description: Defines the deadline in minutes for starting the backup + workload if it misses its scheduled time for any reason. format: int64 maximum: 1440 minimum: 0 @@ -98,40 +97,38 @@ spec: description: BackupScheduleStatus defines the observed state of BackupSchedule. properties: failureReason: - description: failureReason is an error that caused the backup to fail. + description: Represents an error that caused the backup to fail. type: string observedGeneration: - description: 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. + description: Represents the most recent generation observed for this + BackupSchedule. It refers to the BackupSchedule's generation, which + is updated on mutation by the API Server. format: int64 type: integer phase: - description: phase describes the phase of the BackupSchedule. + description: Describes the phase of the BackupSchedule. type: string schedules: additionalProperties: - description: ScheduleStatus defines the status of each schedule. + description: ScheduleStatus represents the status of each schedule. properties: failureReason: - description: failureReason is an error that caused the backup - to fail. + description: Represents an error that caused the backup to fail. type: string lastScheduleTime: - description: lastScheduleTime records the last time the backup - was scheduled. + description: Records the last time the backup was scheduled. format: date-time type: string lastSuccessfulTime: - description: lastSuccessfulTime records the last time the backup - was successfully completed. + description: Records the last time the backup was successfully + completed. format: date-time type: string phase: - description: phase describes the phase of the schedule. + description: Describes the phase of the schedule. type: string type: object - description: schedules describes the status of each schedule. + description: Describes the status of each schedule. type: object type: object type: object diff --git a/deploy/helm/crds/dataprotection.kubeblocks.io_restores.yaml b/deploy/helm/crds/dataprotection.kubeblocks.io_restores.yaml index dc3e8bdcaa3..74a63229c83 100644 --- a/deploy/helm/crds/dataprotection.kubeblocks.io_restores.yaml +++ b/deploy/helm/crds/dataprotection.kubeblocks.io_restores.yaml @@ -67,19 +67,19 @@ spec: minimum: 0 type: integer backup: - description: "backup to be restored. The restore behavior based on - the backup type: \n 1. Full: will be restored the full backup directly. - 2. Incremental: will be restored sequentially from the most recent - full backup of this incremental backup. 3. Differential: will be - restored sequentially from the parent backup of the differential + description: "Specifies the backup to be restored. The restore behavior + is based on the backup type: \n 1. Full: will be restored the full + backup directly. 2. Incremental: will be restored sequentially from + the most recent full backup of this incremental backup. 3. Differential: + will be restored sequentially from the parent backup of the differential backup. 4. Continuous: will find the most recent full backup at this time point and the continuous backups after it to restore." properties: name: - description: backup name + description: Specifies the backup name. type: string namespace: - description: backup namespace + description: Specifies the backup namespace. type: string required: - name @@ -89,7 +89,7 @@ spec: - message: forbidden to update spec.backupName rule: self == oldSelf containerResources: - description: specified the required resources of restore job's container. + description: Specifies the required resources of restore job's container. properties: claims: description: "Claims lists the names of resources, defined in @@ -137,8 +137,8 @@ spec: type: object type: object env: - description: "list of environment variables to set in the container - for restore and will be merged with the env of Backup and ActionSet. + description: "List of environment variables to set in the container + for restore. These will be merged with the env of Backup and ActionSet. \n The priority of merging is as follows: `Restore env > Backup env > ActionSet env`." items: @@ -250,24 +250,23 @@ spec: type: array x-kubernetes-preserve-unknown-fields: true prepareDataConfig: - description: configuration for the action of "prepareData" phase, + description: Configuration for the action of "prepareData" phase, including the persistent volume claims that need to be restored and scheduling strategy of temporary recovery pod. properties: dataSourceRef: - description: dataSourceRef describes the configuration when using - `persistentVolumeClaim.spec.dataSourceRef` method for restoring. - it describes the source volume of the backup targetVolumes and - how to mount path in the restoring container. + description: Specifies the configuration when using `persistentVolumeClaim.spec.dataSourceRef` + method for restoring. Describes the source volume of the backup + targetVolumes and the mount path in the restoring container. properties: mountPath: - description: mountPath path within the restoring container + description: Specifies the path within the restoring container at which the volume should be mounted. type: string volumeSource: - description: volumeSource describes the volume will be restored - from the specified volume of the backup targetVolumes. required - if the backup uses volume snapshot. + description: Describes the volume that will be restored from + the specified volume of the backup targetVolumes. This is + required if the backup uses a volume snapshot. type: string type: object x-kubernetes-validations: @@ -276,11 +275,11 @@ spec: - message: forbidden to update spec.prepareDataConfig.dataSourceRef rule: self == oldSelf schedulingSpec: - description: scheduling spec for restoring pod. + description: Specifies the scheduling spec for the restoring pod. properties: affinity: - description: affinity is a group of affinity scheduling rules. - refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + description: Contains a group of affinity scheduling rules. + Refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ properties: nodeAffinity: description: Describes node affinity scheduling rules @@ -1182,7 +1181,7 @@ spec: type: object type: object nodeName: - description: nodeName is a request to schedule this pod onto + description: Specifies 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. @@ -1190,19 +1189,19 @@ spec: nodeSelector: additionalProperties: type: string - description: '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/' + description: 'Defines a selector which must be true for the + pod to fit on a node. The selector 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/' type: object x-kubernetes-map-type: atomic schedulerName: - description: If specified, the pod will be dispatched by specified - scheduler. If not specified, the pod will be dispatched - by default scheduler. + description: Specifies the scheduler to dispatch the pod. + If not specified, the pod will be dispatched by the default + scheduler. type: string tolerations: - description: the restoring pod's tolerations. + description: Specifies the tolerations for the restoring pod. items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using @@ -1244,10 +1243,9 @@ spec: type: object type: array topologySpreadConstraints: - description: 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/ + description: Describes how a group of pods ought to spread + across topology domains. The scheduler will schedule pods + in a way which abides by the constraints. Refer to https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ items: description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. @@ -1439,24 +1437,24 @@ spec: rule: self == oldSelf volumeClaimRestorePolicy: default: Parallel - description: "VolumeClaimRestorePolicy defines restore policy - for persistent volume claim. Supported policies are as follows: - \n 1. Parallel: parallel recovery of persistent volume claim. - 2. Serial: restore the persistent volume claim in sequence, - and wait until the previous persistent volume claim is restored - before restoring a new one." + description: "Defines restore policy for persistent volume claim. + Supported policies are as follows: \n - `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." enum: - Parallel - Serial type: string volumeClaims: - description: 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. + description: Defines the persistent Volume claims that need to + be restored and mounted together into the restore job. These + persistent Volume claims will be created if they do not exist. items: properties: metadata: - description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + description: 'Specifies the standard metadata for the object. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' properties: annotations: additionalProperties: @@ -1476,12 +1474,12 @@ spec: type: string type: object mountPath: - description: mountPath path within the restoring container + description: Specifies the path within the restoring container at which the volume should be mounted. type: string volumeClaimSpec: - description: volumeClaimSpec defines the desired characteristics - of a persistent volume claim. + description: Defines the desired characteristics of a persistent + volume claim. properties: accessModes: description: 'accessModes contains the desired access @@ -1700,9 +1698,9 @@ spec: type: string type: object volumeSource: - description: volumeSource describes the volume will be restored + description: Describes the volume that will be restored from the specified volume of the backup targetVolumes. - required if the backup uses volume snapshot. + This is required if the backup uses a volume snapshot. type: string required: - metadata @@ -1716,31 +1714,32 @@ spec: - message: forbidden to update spec.prepareDataConfig.volumeClaims rule: self == oldSelf volumeClaimsTemplate: - description: 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. + description: 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 + they already exist. properties: replicas: - description: the replicas of persistent volume claim which - need to be created and restored. the format of created claim - name is `$(template-name)-$(index)`. + description: Specifies the replicas of persistent volume claim + that need to be created and restored. The format of the + created claim name is `$(template-name)-$(index)`. format: int32 minimum: 1 type: integer startingIndex: - description: the starting index for the created persistent - volume claim by according to template. minimum is 0. + description: Specifies the starting index for the created + persistent volume claim according to the template. The minimum + value is 0. format: int32 minimum: 0 type: integer templates: - description: templates is a list of volume claims. + description: Contains a list of volume claims. items: properties: metadata: - description: 'Standard object''s metadata. More info: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' + description: 'Specifies the standard metadata for the + object. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata' properties: annotations: additionalProperties: @@ -1760,12 +1759,12 @@ spec: type: string type: object mountPath: - description: mountPath path within the restoring container - at which the volume should be mounted. + description: Specifies the path within the restoring + container at which the volume should be mounted. type: string volumeClaimSpec: - description: volumeClaimSpec defines the desired characteristics - of a persistent volume claim. + description: Defines the desired characteristics of + a persistent volume claim. properties: accessModes: description: 'accessModes contains the desired access @@ -1997,10 +1996,9 @@ spec: type: string type: object volumeSource: - description: volumeSource describes the volume will - be restored from the specified volume of the backup - targetVolumes. required if the backup uses volume - snapshot. + description: Describes the volume that will be restored + from the specified volume of the backup targetVolumes. + This is required if the backup uses a volume snapshot. type: string required: - metadata @@ -2021,51 +2019,51 @@ spec: - volumeClaimRestorePolicy type: object readyConfig: - description: configuration for the action of "postReady" phase. + description: Configuration for the action of "postReady" phase. properties: connectionCredential: - description: credential template used for creating a connection - credential + description: Defines the credential template used to create a + connection credential. properties: hostKey: - description: hostKey specifies the map key of the host in - the connection credential secret. + description: Specifies the map key of the host in the connection + credential secret. type: string passwordKey: default: password - description: 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. + description: 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. type: string portKey: - description: portKey specifies the map key of the port in - the connection credential secret. + description: Specifies the map key of the port in the connection + credential secret. type: string secretName: - description: secretName refers to the Secret object that contains - the connection credential. + description: Refers to the Secret object that contains the + connection credential. pattern: ^[a-z0-9]([a-z0-9\.\-]*[a-z0-9])?$ type: string usernameKey: default: username - description: usernameKey specifies the map key of the user - in the connection credential secret. + description: Specifies the map key of the user in the connection + credential secret. type: string required: - secretName type: object execAction: - description: configuration for exec action. + description: Specifies the configuration for an exec action. properties: target: - description: execActionTarget defines the pods that need to - be executed for the exec action. will execute on all pods - that meet the conditions. + description: Defines the pods that need to be executed for + the exec action. Execution will occur on all pods that meet + the conditions. properties: podSelector: - description: kubectl exec in all selected pods. + description: Executes kubectl in all selected pods. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -2115,17 +2113,18 @@ spec: type: object type: object jobAction: - description: configuration for job action. + description: Specifies the configuration for a job action. properties: target: - description: jobActionTarget defines the pod that need to - be executed for the job action. will select a pod that meets - the conditions to execute. + description: Defines the pod that needs to be executed for + the job action. A pod that meets the conditions will be + selected for execution. properties: podSelector: - description: 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. + description: Selects one of the pods, identified by labels, + to build the job spec. This includes mounting required + volumes and injecting built-in environment variables + of the selected pod. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -2171,8 +2170,8 @@ spec: type: object x-kubernetes-map-type: atomic volumeMounts: - description: volumeMounts defines which volumes of the - selected pod need to be mounted on the restoring pod. + description: Defines which volumes of the selected pod + need to be mounted on the restoring pod. items: description: VolumeMount describes a mounting of a Volume within a container. @@ -2221,40 +2220,42 @@ spec: - target type: object readinessProbe: - description: periodic probe of the service readiness. controller - will perform postReadyHooks of BackupScript.spec.restore after - the service readiness when readinessProbe is configured. + description: Defines a periodic probe of the service readiness. + The controller will perform postReadyHooks of BackupScript.spec.restore + after the service readiness when readinessProbe is configured. properties: exec: - description: exec specifies the action to take. + description: Specifies the action to take. properties: command: - description: refer to container command. + description: Refers to the container command. items: type: string type: array image: - description: refer to container image. + description: Refers to the container image. type: string required: - command - image type: object initialDelaySeconds: - description: number of seconds after the container has started - before probe is initiated. + description: Specifies the number of seconds after the container + has started before the probe is initiated. minimum: 0 type: integer periodSeconds: default: 5 - description: how often (in seconds) to perform the probe. - defaults to 5 second, minimum value is 1. + description: Specifies how often (in seconds) to perform the + probe. The default value is 5 seconds, and the minimum value + is 1. minimum: 1 type: integer timeoutSeconds: default: 30 - description: number of seconds after which the probe times - out. defaults to 30 second, minimum value is 1. + description: Specifies the number of seconds after which the + probe times out. The default value is 30 seconds, and the + minimum value is 1. minimum: 1 type: integer required: @@ -2265,16 +2266,16 @@ spec: - message: at least one exists for jobAction and execAction. rule: has(self.jobAction) || has(self.execAction) resources: - description: restore the specified resources of kubernetes. + description: Restores the specified resources of Kubernetes. properties: included: - description: will restore the specified resources + description: Restores the specified resources. items: properties: groupResource: type: string labelSelector: - description: select the specified resource for recovery + description: Selects the specified resource for recovery by label. properties: matchExpressions: @@ -2329,14 +2330,15 @@ spec: - message: forbidden to update spec.resources rule: self == oldSelf restoreTime: - description: restoreTime is the point in time for restoring. + description: Specifies the point in time for restoring. pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$ type: string x-kubernetes-validations: - message: forbidden to update spec.restoreTime rule: self == oldSelf serviceAccountName: - description: service account name which needs for recovery pod. + description: Specifies the service account name needed for recovery + pod. type: string required: - backup @@ -2345,38 +2347,38 @@ spec: description: RestoreStatus defines the observed state of Restore properties: actions: - description: recorded all restore actions performed. + description: Records all restore actions performed. properties: postReady: - description: record the actions for postReady phase. + description: Records the actions for the postReady phase. items: properties: backupName: - description: which backup's restore action belongs to. + description: Describes which backup's restore action belongs + to. type: string endTime: - description: endTime is the completion time for the restore - job. + description: The completion time of the restore job. format: date-time type: string message: - description: message is a human-readable message indicating + description: Provides a human-readable message indicating details about the object condition. type: string name: - description: name describes the name of the recovery action - based on the current backup. + description: Describes the name of the restore action based + on the current backup. type: string objectKey: - description: the execution object of the restore action. + description: Describes the execution object of the restore + action. type: string startTime: - description: startTime is the start time for the restore - job. + description: The start time of the restore job. format: date-time type: string status: - description: the status of this action. + description: The status of this action. enum: - Processing - Completed @@ -2389,35 +2391,35 @@ spec: type: object type: array prepareData: - description: record the actions for prepareData phase. + description: Records the actions for the prepareData phase. items: properties: backupName: - description: which backup's restore action belongs to. + description: Describes which backup's restore action belongs + to. type: string endTime: - description: endTime is the completion time for the restore - job. + description: The completion time of the restore job. format: date-time type: string message: - description: message is a human-readable message indicating + description: Provides a human-readable message indicating details about the object condition. type: string name: - description: name describes the name of the recovery action - based on the current backup. + description: Describes the name of the restore action based + on the current backup. type: string objectKey: - description: the execution object of the restore action. + description: Describes the execution object of the restore + action. type: string startTime: - description: startTime is the start time for the restore - job. + description: The start time of the restore job. format: date-time type: string status: - description: the status of this action. + description: The status of this action. enum: - Processing - Completed @@ -2431,12 +2433,13 @@ spec: type: array type: object completionTimestamp: - description: Date/time when the restore finished being processed. + description: Records the date/time when the restore finished being + processed. format: date-time type: string conditions: - description: describe current state of restore API Resource, like - warning. + description: Describes the current state of the restore API Resource, + like warning. items: description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct @@ -2505,12 +2508,11 @@ spec: type: object type: array duration: - description: The duration time of restore execution. When converted + description: Records the duration of the restore execution. When converted to a string, the form is "1h2m0.5s". type: string phase: - description: RestorePhase The current phase. Valid values are Running, - Completed, Failed, AsDataSource. + description: Represents the current phase of the restore. enum: - Running - Completed @@ -2518,7 +2520,8 @@ spec: - AsDataSource type: string startTimestamp: - description: Date/time when the restore started being processed. + description: Records the date/time when the restore started being + processed. format: date-time type: string type: object diff --git a/docs/developer_docs/api-reference/backup.md b/docs/developer_docs/api-reference/backup.md index aff0052759d..d6484efc0db 100644 --- a/docs/developer_docs/api-reference/backup.md +++ b/docs/developer_docs/api-reference/backup.md @@ -97,14 +97,14 @@ BackupType -

backupType specifies the backup type, supported values:

+

Specifies the backup type. Supported values include:

+

Continuous backup is essential for implementing Point-in-Time Recovery (PITR).

@@ -118,7 +118,7 @@ can be performed based on the continuous backup and full backup. (Optional) -

List of environment variables to set in the container.

+

Specifies a list of environment variables to be set in the container.

@@ -132,12 +132,12 @@ can be performed based on the continuous backup and full backup. (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.

+

Specifies a list of sources to populate environment variables in the container. +The keys within a source must be a C_IDENTIFIER. Any invalid keys will be +reported as an event when the container starts. If a key exists in multiple +sources, the value from the last source will take precedence. Any values +defined by an Env with a duplicate key will take precedence.

+

This field cannot be updated.

@@ -151,7 +151,7 @@ BackupActionSpec (Optional) -

backup specifies the backup action.

+

Specifies the backup action.

@@ -165,7 +165,7 @@ RestoreActionSpec (Optional) -

restore specifies the restore action.

+

Specifies the restore action.

@@ -248,7 +248,7 @@ string -

Which backupPolicy is applied to perform this backup.

+

Specifies the backup policy to be applied for this backup.

@@ -259,7 +259,7 @@ string -

backupMethod specifies the backup method name that is defined in backupPolicy.

+

Specifies the backup method name that is defined in the backup policy.

@@ -272,14 +272,14 @@ BackupDeletionPolicy -

deletionPolicy determines whether the backup contents stored in backup repository -should be deleted when the backup custom resource is deleted. +

Determines whether the backup contents stored in the backup repository +should be deleted when the backup custom resource(CR) is deleted. Supported values are Retain and Delete.

-

the backup custom objects but retaining the backup contents in backup repository. +

the backup CR but retaining the backup contents in backup repository. The current implementation only prevent accidental deletion of backup data.

@@ -294,8 +294,9 @@ RetentionPeriod (Optional) -

retentionPeriod determines a duration up to which the backup should be kept. +

Determines a duration up to which the backup should be kept. Controller will remove all backups that are older than the RetentionPeriod. +If not set, the backup will be kept forever. For example, RetentionPeriod of 30d will keep only the backups of last 30 days. Sample duration format:

-

You can also combine the above durations. For example: 30d12h30m. -If not set, the backup will be kept forever.

+

You can also combine the above durations. For example: 30d12h30m.

@@ -318,8 +318,7 @@ string (Optional) -

parentBackupName determines the parent backup name for incremental or -differential backup.

+

Determines the parent backup name for incremental or differential backup.

@@ -403,9 +402,8 @@ 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.

+

Specifies the name of BackupRepo where the backup data will be stored. +If not set, data will be stored in the default backup repository.

@@ -417,8 +415,8 @@ 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.

+

Specifies the directory inside the backup repository to store the backup. +This path is relative to the path of the backup repository.

@@ -430,7 +428,7 @@ int32 (Optional) -

Specifies the number of retries before marking the backup failed.

+

Specifies the number of retries before marking the backup as failed.

@@ -443,7 +441,8 @@ BackupTarget -

target specifies the target information to back up.

+

Specifies the target information to back up, such as the target pod, the +cluster connection credential.

@@ -456,7 +455,7 @@ BackupTarget -

backupMethods defines the backup methods.

+

Defines the backup methods.

@@ -468,13 +467,12 @@ bool (Optional) -

useKopia specifies whether backup data should be stored in a Kopia repository.

+

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.

+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.

@@ -707,7 +705,7 @@ string -

Which backupPolicy is applied to perform this backup.

+

Specifies the backupPolicy to be applied for the schedules.

@@ -719,8 +717,8 @@ int64 (Optional) -

startingDeadlineMinutes defines the deadline in minutes for starting the -backup workload if it misses scheduled time for any reason.

+

Defines the deadline in minutes for starting the backup workload if it +misses its scheduled time for any reason.

@@ -733,7 +731,7 @@ backup workload if it misses scheduled time for any reason.

-

schedules defines the list of backup schedules.

+

Defines the list of backup schedules.

@@ -818,7 +816,7 @@ BackupRef -

backup to be restored. The restore behavior based on the backup type:

+

Specifies the backup to be restored. The restore behavior is based on the backup type:

  1. Full: will be restored the full backup directly.
  2. Incremental: will be restored sequentially from the most recent full backup of this incremental backup.
  3. @@ -836,7 +834,7 @@ string (Optional) -

    restoreTime is the point in time for restoring.

    +

    Specifies the point in time for restoring.

    @@ -850,7 +848,7 @@ RestoreKubeResources (Optional) -

    restore the specified resources of kubernetes.

    +

    Restores the specified resources of Kubernetes.

    @@ -864,7 +862,7 @@ PrepareDataConfig (Optional) -

    configuration for the action of “prepareData” phase, including the persistent volume claims +

    Configuration for the action of “prepareData” phase, including the persistent volume claims that need to be restored and scheduling strategy of temporary recovery pod.

    @@ -877,7 +875,7 @@ string (Optional) -

    service account name which needs for recovery pod.

    +

    Specifies the service account name needed for recovery pod.

    @@ -891,7 +889,7 @@ ReadyConfig (Optional) -

    configuration for the action of “postReady” phase.

    +

    Configuration for the action of “postReady” phase.

    @@ -905,7 +903,7 @@ ReadyConfig (Optional) -

    list of environment variables to set in the container for restore and will be +

    List of environment variables to set in the container for restore. These will be merged with the env of Backup and ActionSet.

    The priority of merging is as follows: Restore env > Backup env > ActionSet env.

    @@ -921,7 +919,7 @@ Kubernetes core/v1.ResourceRequirements (Optional) -

    specified the required resources of restore job’s container.

    +

    Specifies the required resources of restore job’s container.

    @@ -985,7 +983,8 @@ tool for accessing the storage.

    (Appears on:ExecActionSpec, JobActionSpec)

    -

    ActionErrorMode defines how should treat an error from an action.

    +

    ActionErrorMode defines how to handle an error from an action. +Currently, only the Fail mode is supported, but the Continue mode will be supported in the future.

    @@ -995,10 +994,10 @@ tool for accessing the storage.

    - -

    "Continue"

    ActionErrorModeContinue means that an error from an action is acceptable.

    +

    ActionErrorModeContinue signifies that an error from an action is acceptable and can be ignored.

    "Fail"

    ActionErrorModeFail means that an error from an action is problematic.

    +

    ActionErrorModeFail signifies that an error from an action is problematic and should be treated as a failure.

    @@ -1057,14 +1056,14 @@ BackupType -

    backupType specifies the backup type, supported values:

    +

    Specifies the backup type. Supported values include:

      -
    • Full means full backup.
    • -
    • Incremental means back up data that have changed since the last backup (full or incremental).
    • -
    • Differential means back up data that have changed since the last full backup.
    • -
    • Continuous will back up the transaction log continuously, the PITR (Point in Time Recovery) -can be performed based on the continuous backup and full backup.
    • +
    • Full for a full backup.
    • +
    • Incremental back up data that have changed since the last backup (either full or incremental).
    • +
    • Differential back up data that has changed since the last full backup.
    • +
    • Continuous back up transaction logs continuously, such as MySQL binlog, PostgreSQL WAL, etc.
    +

    Continuous backup is essential for implementing Point-in-Time Recovery (PITR).

    @@ -1078,7 +1077,7 @@ can be performed based on the continuous backup and full backup. (Optional) -

    List of environment variables to set in the container.

    +

    Specifies a list of environment variables to be set in the container.

    @@ -1092,12 +1091,12 @@ can be performed based on the continuous backup and full backup. (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.

    +

    Specifies a list of sources to populate environment variables in the container. +The keys within a source must be a C_IDENTIFIER. Any invalid keys will be +reported as an event when the container starts. If a key exists in multiple +sources, the value from the last source will take precedence. Any values +defined by an Env with a duplicate key will take precedence.

    +

    This field cannot be updated.

    @@ -1111,7 +1110,7 @@ BackupActionSpec (Optional) -

    backup specifies the backup action.

    +

    Specifies the backup action.

    @@ -1125,7 +1124,7 @@ RestoreActionSpec (Optional) -

    restore specifies the restore action.

    +

    Specifies the restore action.

    @@ -1157,7 +1156,7 @@ Phase (Optional) -

    phase - in list of [Available,Unavailable]

    +

    Indicates the phase of the ActionSet. This can be either ‘Available’ or ‘Unavailable’.

    @@ -1169,7 +1168,7 @@ string (Optional) -

    A human-readable message indicating details about why the ActionSet is in this phase.

    +

    Provides a human-readable explanation detailing the reason for the current phase of the ActionSet.

    @@ -1181,7 +1180,7 @@ int64 (Optional) -

    generation number

    +

    Represents the generation number that has been observed by the controller.

    @@ -1213,7 +1212,7 @@ ExecActionSpec (Optional) -

    exec specifies the action should be executed by the pod exec API in a container.

    +

    Specifies that the action should be executed using the pod’s exec API within a container.

    @@ -1227,7 +1226,7 @@ JobActionSpec (Optional) -

    job specifies the action should be executed by a Kubernetes Job.

    +

    Specifies that the action should be executed by a Kubernetes Job.

    @@ -1255,7 +1254,8 @@ string -

    name is the name of the action.

    +(Optional) +

    The name of the action.

    @@ -1269,7 +1269,7 @@ ActionPhase (Optional) -

    phase is the current state of the action.

    +

    The current phase of the action.

    @@ -1283,7 +1283,7 @@ Kubernetes meta/v1.Time (Optional) -

    startTimestamp records the time an action was started.

    +

    Records the time an action was started.

    @@ -1297,7 +1297,7 @@ Kubernetes meta/v1.Time (Optional) -

    completionTimestamp records the time an action was completed.

    +

    Records the time an action was completed.

    @@ -1309,7 +1309,7 @@ string (Optional) -

    failureReason is an error that caused the backup to fail.

    +

    An error that caused the action to fail.

    @@ -1323,7 +1323,7 @@ ActionType (Optional) -

    actionType is the type of the action.

    +

    The type of the action.

    @@ -1335,7 +1335,7 @@ int32 (Optional) -

    availableReplicas available replicas for statefulSet action.

    +

    Available replicas for statefulSet action.

    @@ -1349,7 +1349,7 @@ Kubernetes core/v1.ObjectReference (Optional) -

    objectRef is the object reference for the action.

    +

    The object reference for the action.

    @@ -1361,8 +1361,9 @@ string (Optional) -

    totalSize is the total size of backed up data size. -A string with capacity units in the format of “1Gi”, “1Mi”, “1Ki”.

    +

    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.

    @@ -1376,8 +1377,8 @@ BackupTimeRange (Optional) -

    timeRange records the time range of backed up data, for PITR, this is the -time range of recoverable data.

    +

    Records the time range of backed up data, for PITR, this is the time +range of recoverable data.

    @@ -1391,7 +1392,7 @@ time range of recoverable data.

    (Optional) -

    volumeSnapshots records the volume snapshot status for the action.

    +

    Records the volume snapshot status for the action.

    @@ -1443,7 +1444,7 @@ BackupDataActionSpec -

    backupData specifies the backup data action.

    +

    Represents the action to be performed for backing up data.

    @@ -1457,7 +1458,7 @@ BackupDataActionSpec (Optional) -

    preBackup specifies a hook that should be executed before the backup.

    +

    Represents a set of actions that should be executed before the backup process begins.

    @@ -1471,7 +1472,7 @@ BackupDataActionSpec (Optional) -

    postBackup specifies a hook that should be executed after the backup.

    +

    Represents a set of actions that should be executed after the backup process has completed.

    @@ -1485,8 +1486,8 @@ 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.

    +

    Represents a custom deletion action that can be executed before the built-in deletion action. +Note: The preDelete action job will ignore the env/envFrom.

    @@ -1533,7 +1534,8 @@ SyncProgress (Optional) -

    syncProgress specifies whether to sync the backup progress and its interval seconds.

    +

    Determines if the backup progress should be synchronized and the interval +for synchronization in seconds.

    @@ -1544,7 +1546,7 @@ SyncProgress (Appears on:BackupSpec)

    -

    BackupDeletionPolicy describes a policy for end-of-life maintenance of backup content.

    +

    BackupDeletionPolicy describes the policy for end-of-life maintenance of backup content.

    @@ -1583,7 +1585,7 @@ string @@ -1595,9 +1597,9 @@ bool @@ -1609,7 +1611,7 @@ string @@ -1625,8 +1627,7 @@ TargetVolumeInfo @@ -1640,7 +1641,7 @@ the backup workload.

    @@ -1654,7 +1655,7 @@ RuntimeSettings @@ -1668,7 +1669,7 @@ BackupTarget @@ -1679,7 +1680,7 @@ BackupTarget (Appears on:BackupStatus)

    -

    BackupPhase is a string representation of the lifecycle phase of a Backup.

    +

    BackupPhase describes the lifecycle phase of a Backup.

    -

    the name of backup method.

    +

    The name of backup method.

    (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.

    +

    Specifies whether to take snapshots of persistent volumes. If true, +the ActionSetName is not required, the controller will use the CSI volume +snapshotter to create the snapshot.

    (Optional) -

    actionSetName refers to the ActionSet object that defines the backup actions. +

    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.

    (Optional) -

    targetVolumes specifies which volumes from the target should be mounted in -the backup workload.

    +

    Specifies which volumes from the target should be mounted in the backup workload.

    (Optional) -

    env specifies the environment variables for the backup workload.

    +

    Specifies the environment variables for the backup workload.

    (Optional) -

    runtimeSettings specifies runtime settings for the backup workload container.

    +

    Specifies runtime settings for the backup workload container.

    (Optional) -

    target specifies the target information to back up, it will override the global target policy.

    +

    Specifies the target information to back up, it will override the target in backup policy.

    @@ -1750,9 +1751,8 @@ string @@ -1764,8 +1764,8 @@ string @@ -1777,7 +1777,7 @@ int32 @@ -1790,7 +1790,8 @@ BackupTarget @@ -1803,7 +1804,7 @@ BackupTarget @@ -1815,13 +1816,12 @@ bool @@ -1853,7 +1853,7 @@ Phase @@ -1865,8 +1865,8 @@ string @@ -1878,9 +1878,8 @@ int64 @@ -1909,7 +1908,7 @@ string @@ -1920,7 +1919,7 @@ string @@ -2187,10 +2186,10 @@ bool - -
    (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.

    +

    Specifies the name of BackupRepo where the backup data will be stored. +If not set, data will be stored in the default backup repository.

    (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.

    +

    Specifies the directory inside the backup repository to store the backup. +This path is relative to the path of the backup repository.

    (Optional) -

    Specifies the number of retries before marking the backup failed.

    +

    Specifies the number of retries before marking the backup as failed.

    -

    target specifies the target information to back up.

    +

    Specifies the target information to back up, such as the target pod, the +cluster connection credential.

    -

    backupMethods defines the backup methods.

    +

    Defines the backup methods.

    (Optional) -

    useKopia specifies whether backup data should be stored in a Kopia repository.

    +

    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.

    +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.

    (Optional) -

    phase - in list of [Available,Unavailable]

    +

    Phase - in list of [Available,Unavailable]

    (Optional) -

    A human-readable message indicating details about why the BackupPolicy is -in this phase.

    +

    A human-readable message indicating details about why the BackupPolicy +is in this phase.

    (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.

    +

    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.

    -

    backup name

    +

    Specifies the backup name.

    -

    backup namespace

    +

    Specifies the backup namespace.

    "Available"

    BackupSchedulePhaseAvailable means the backup schedule is available.

    +

    BackupSchedulePhaseAvailable indicates the backup schedule is available.

    "Failed"

    BackupSchedulePhaseFailed means the backup schedule is failed.

    +

    BackupSchedulePhaseFailed indicates the backup schedule has failed.

    @@ -2218,7 +2217,7 @@ string -

    Which backupPolicy is applied to perform this backup.

    +

    Specifies the backupPolicy to be applied for the schedules.

    @@ -2230,8 +2229,8 @@ int64 (Optional) -

    startingDeadlineMinutes defines the deadline in minutes for starting the -backup workload if it misses scheduled time for any reason.

    +

    Defines the deadline in minutes for starting the backup workload if it +misses its scheduled time for any reason.

    @@ -2244,7 +2243,7 @@ backup workload if it misses scheduled time for any reason.

    -

    schedules defines the list of backup schedules.

    +

    Defines the list of backup schedules.

    @@ -2276,7 +2275,7 @@ BackupSchedulePhase (Optional) -

    phase describes the phase of the BackupSchedule.

    +

    Describes the phase of the BackupSchedule.

    @@ -2288,9 +2287,9 @@ 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.

    +

    Represents the most recent generation observed for this BackupSchedule. +It refers to the BackupSchedule’s generation, which is updated on mutation +by the API Server.

    @@ -2302,7 +2301,7 @@ string (Optional) -

    failureReason is an error that caused the backup to fail.

    +

    Represents an error that caused the backup to fail.

    @@ -2316,7 +2315,7 @@ map[string]github.com/apecloud/kubeblocks/apis/dataprotection/v1alpha1.ScheduleS (Optional) -

    schedules describes the status of each schedule.

    +

    Describes the status of each schedule.

    @@ -2345,7 +2344,7 @@ string -

    Which backupPolicy is applied to perform this backup.

    +

    Specifies the backup policy to be applied for this backup.

    @@ -2356,7 +2355,7 @@ string -

    backupMethod specifies the backup method name that is defined in backupPolicy.

    +

    Specifies the backup method name that is defined in the backup policy.

    @@ -2369,14 +2368,14 @@ BackupDeletionPolicy -

    deletionPolicy determines whether the backup contents stored in backup repository -should be deleted when the backup custom resource is deleted. +

    Determines whether the backup contents stored in the backup repository +should be deleted when the backup custom resource(CR) is deleted. Supported values are Retain and Delete.

    • Retain means that the backup content and its physical snapshot on backup repository are kept.
    • Delete means that the backup content and its physical snapshot on backup repository are deleted.
    -

    the backup custom objects but retaining the backup contents in backup repository. +

    the backup CR but retaining the backup contents in backup repository. The current implementation only prevent accidental deletion of backup data.

    @@ -2391,8 +2390,9 @@ RetentionPeriod (Optional) -

    retentionPeriod determines a duration up to which the backup should be kept. +

    Determines a duration up to which the backup should be kept. Controller will remove all backups that are older than the RetentionPeriod. +If not set, the backup will be kept forever. For example, RetentionPeriod of 30d will keep only the backups of last 30 days. Sample duration format:

      @@ -2402,8 +2402,7 @@ Sample duration format:

    • hours: 12h
    • minutes: 30m
    -

    You can also combine the above durations. For example: 30d12h30m. -If not set, the backup will be kept forever.

    +

    You can also combine the above durations. For example: 30d12h30m.

    @@ -2415,8 +2414,7 @@ string (Optional) -

    parentBackupName determines the parent backup name for incremental or -differential backup.

    +

    Determines the parent backup name for incremental or differential backup.

    @@ -2446,7 +2444,7 @@ string (Optional) -

    formatVersion is the backup format version, including major, minor and patch version.

    +

    Specifies the backup format version, which includes major, minor, and patch versions.

    @@ -2460,7 +2458,7 @@ BackupPhase (Optional) -

    phase is the current state of the Backup.

    +

    Indicates the current state of the backup operation.

    @@ -2474,8 +2472,8 @@ 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.

    +

    Indicates when this backup becomes eligible for garbage collection. +A ‘null’ value implies that the backup will not be cleaned up unless manually deleted.

    @@ -2489,8 +2487,8 @@ Kubernetes meta/v1.Time (Optional) -

    startTimestamp records the time a backup was started. -The server’s time is used for StartTimestamp.

    +

    Records the time when the backup operation was started. +The server’s time is used for this timestamp.

    @@ -2504,9 +2502,9 @@ 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.

    +

    Records the time when the backup operation was completed. +This timestamp is recorded even if the backup operation fails. +The server’s time is used for this timestamp.

    @@ -2520,7 +2518,7 @@ Kubernetes meta/v1.Duration (Optional) -

    The duration time of backup execution. +

    Records the duration of the backup operation. When converted to a string, the format is “1h2m0.5s”.

    @@ -2533,8 +2531,8 @@ string (Optional) -

    totalSize is the total size of backed up data size. -A string with capacity units in the format of “1Gi”, “1Mi”, “1Ki”. +

    Records the total size of the data backed up. +The size is represented as 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.

    @@ -2547,7 +2545,7 @@ string (Optional) -

    failureReason is an error that caused the backup to fail.

    +

    Any error that caused the backup operation to fail.

    @@ -2559,7 +2557,7 @@ string (Optional) -

    backupRepoName is the name of the backup repository.

    +

    The name of the backup repository.

    @@ -2571,8 +2569,8 @@ 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.

    +

    The directory within the backup repository where the backup data is stored. +This is an absolute path within the backup repository.

    @@ -2584,7 +2582,7 @@ string (Optional) -

    kopiaRepoPath records the path of the Kopia repository.

    +

    Records the path of the Kopia repository.

    @@ -2596,8 +2594,7 @@ string (Optional) -

    persistentVolumeClaimName is the name of the persistent volume claim that -is used to store the backup data.

    +

    Records the name of the persistent volume claim used to store the backup data.

    @@ -2611,8 +2608,8 @@ BackupTimeRange (Optional) -

    timeRange records the time range of backed up data, for PITR, this is the -time range of recoverable data.

    +

    Records the time range of the data backed up. For Point-in-Time Recovery (PITR), +this is the time range of recoverable data.

    @@ -2626,7 +2623,7 @@ BackupTarget (Optional) -

    target records the target information for this backup.

    +

    Records the target information for this backup.

    @@ -2640,7 +2637,7 @@ BackupMethod (Optional) -

    backupMethod records the backup method information for this backup. +

    Records the backup method information for this backup. Refer to BackupMethod for more details.

    @@ -2655,7 +2652,7 @@ Refer to BackupMethod for more details.

    (Optional) -

    actions records the actions information for this backup.

    +

    Records the actions status for this backup.

    @@ -2669,7 +2666,7 @@ Refer to BackupMethod for more details.

    (Optional) -

    volumeSnapshots records the volume snapshot status for the action.

    +

    Records the volume snapshot status for the action.

    @@ -2680,7 +2677,8 @@ Refer to BackupMethod for more details.

    -

    extra records the extra info for the backup.

    +(Optional) +

    Records any additional information for the backup.

    @@ -2710,8 +2708,7 @@ PodSelector -

    podSelector is used to find the target pod. The volumes of the target pod -will be backed up.

    +

    Used to find the target pod. The volumes of the target pod will be backed up.

    @@ -2725,8 +2722,7 @@ ConnectionCredential (Optional) -

    connectionCredential specifies the connection credential to connect to the -target database cluster.

    +

    Specifies the connection credential to connect to the target database cluster.

    @@ -2740,7 +2736,7 @@ KubeResources (Optional) -

    resources specifies the kubernetes resources to back up.

    +

    Specifies the kubernetes resources to back up.

    @@ -2751,7 +2747,7 @@ string -

    serviceAccountName specifies the service account to run the backup workload.

    +

    Specifies the service account to run the backup workload.

    @@ -2782,7 +2778,7 @@ string (Optional) -

    time zone, only support zone offset, value range: “-12:59 ~ +13:00”

    +

    time zone, supports only zone offset, with a value range of “-12:59 ~ +13:00”.

    @@ -2796,7 +2792,7 @@ Kubernetes meta/v1.Time (Optional) -

    start records the start time of backup(Coordinated Universal Time, UTC).

    +

    Records the start time of the backup, in Coordinated Universal Time (UTC).

    @@ -2810,7 +2806,7 @@ Kubernetes meta/v1.Time (Optional) -

    end records the end time of backup(Coordinated Universal Time, UTC).

    +

    Records the end time of the backup, in Coordinated Universal Time (UTC).

    @@ -2864,7 +2860,7 @@ string -

    image specifies the image of backup container.

    +

    Specifies the image of the backup container.

    @@ -2875,7 +2871,7 @@ string -

    command specifies the commands to back up the volume data.

    +

    Defines the commands to back up the volume data.

    @@ -2905,7 +2901,7 @@ string -

    secretName refers to the Secret object that contains the connection credential.

    +

    Refers to the Secret object that contains the connection credential.

    @@ -2916,7 +2912,7 @@ string -

    usernameKey specifies the map key of the user in the connection credential secret.

    +

    Specifies the map key of the user in the connection credential secret.

    @@ -2927,7 +2923,7 @@ string -

    passwordKey specifies the map key of the password in the connection credential secret. +

    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.

    @@ -2940,7 +2936,8 @@ string -

    hostKey specifies the map key of the host in the connection credential secret.

    +(Optional) +

    Specifies the map key of the host in the connection credential secret.

    @@ -2951,7 +2948,8 @@ string -

    portKey specifies the map key of the port in the connection credential secret.

    +(Optional) +

    Specifies the map key of the port in the connection credential secret.

    @@ -2982,8 +2980,8 @@ ExecActionTarget (Optional) -

    execActionTarget defines the pods that need to be executed for the exec action. -will execute on all pods that meet the conditions.

    +

    Defines the pods that need to be executed for the exec action. +Execution will occur on all pods that meet the conditions.

    @@ -3014,8 +3012,8 @@ 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.

    +

    Specifies the container within the pod where the command should be executed. +If not specified, the first container in the pod is used by default.

    @@ -3026,7 +3024,7 @@ If not specified, the pod’s first container is used.

    -

    Command is the command and arguments to execute.

    +

    Defines the command and arguments to be executed.

    @@ -3040,7 +3038,7 @@ ActionErrorMode (Optional) -

    OnError specifies how should behave if it encounters an error executing this action.

    +

    Indicates how to behave if an error is encountered during the execution of this action.

    @@ -3054,7 +3052,7 @@ Kubernetes meta/v1.Duration (Optional) -

    Timeout defines the maximum amount of time should wait for the hook to complete before +

    Specifies the maximum duration to wait for the hook to complete before considering the execution a failure.

    @@ -3085,7 +3083,7 @@ Kubernetes meta/v1.LabelSelector -

    kubectl exec in all selected pods.

    +

    Executes kubectl in all selected pods.

    @@ -3126,7 +3124,7 @@ Kubernetes meta/v1.LabelSelector (Optional) -

    select the specified resource for recovery by label.

    +

    Selects the specified resource for recovery by label.

    @@ -3156,8 +3154,8 @@ JobActionTarget -

    jobActionTarget defines the pod that need to be executed for the job action. -will select a pod that meets the conditions to execute.

    +

    Defines the pod that needs to be executed for the job action. +A pod that meets the conditions will be selected for execution.

    @@ -3202,10 +3200,9 @@ 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.

    +

    Determines whether to run the job workload on the target pod node. +If the backup container needs to mount the target pod’s volumes, this field +should be set to true. Otherwise, the target pod’s volumes will be ignored.

    @@ -3219,8 +3216,7 @@ ActionErrorMode (Optional) -

    OnError specifies how should behave if it encounters an error executing -this action.

    +

    Indicates how to behave if an error is encountered during the execution of this action.

    @@ -3250,7 +3246,8 @@ 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.

    +

    Selects one of the pods, identified by labels, to build the job spec. +This includes mounting required volumes and injecting built-in environment variables of the selected pod.

    @@ -3264,7 +3261,7 @@ Kubernetes meta/v1.LabelSelector (Optional) -

    volumeMounts defines which volumes of the selected pod need to be mounted on the restoring pod.

    +

    Defines which volumes of the selected pod need to be mounted on the restoring pod.

    @@ -3295,9 +3292,8 @@ 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.

    +

    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.

    @@ -3311,7 +3307,7 @@ If not set, will do not back up any kubernetes resources.

    (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.

    +The default value is empty.

    @@ -3416,12 +3412,11 @@ PodSelectionStrategy -

    strategy specifies the strategy to select the target pod when multiple pods -are selected. -Valid values are:

    +

    Specifies the strategy to select the target pod when multiple pods are selected. +Valid values are: Any: select any one pod that match the labelsSelector.

      -
    • Any: select any one pod that match the labelsSelector.
    • -
    • All: select all pods that match the labelsSelector.
    • +
    • Any: select any one pod that match the labelsSelector.
    • +
    • All: select all pods that match the labelsSelector.
    @@ -3453,8 +3448,8 @@ VolumeConfig (Optional) -

    dataSourceRef describes the configuration when using persistentVolumeClaim.spec.dataSourceRef method for restoring. -it describes the source volume of the backup targetVolumes and how to mount path in the restoring container.

    +

    Specifies the configuration when using persistentVolumeClaim.spec.dataSourceRef method for restoring. +Describes the source volume of the backup targetVolumes and the mount path in the restoring container.

    @@ -3468,8 +3463,8 @@ it describes the source volume of the backup targetVolumes and how to mount path (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.

    +

    Defines the persistent Volume claims that need to be restored and mounted together into the restore job. +These persistent Volume claims will be created if they do not exist.

    @@ -3483,8 +3478,8 @@ 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.

    +

    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 they already exist.

    @@ -3497,12 +3492,12 @@ VolumeClaimRestorePolicy -

    VolumeClaimRestorePolicy defines restore policy for persistent volume claim. +

    Defines restore policy for persistent volume claim. Supported policies are as follows:

    -
      -
    1. Parallel: parallel recovery of persistent volume claim.
    2. -
    3. Serial: restore the persistent volume claim in sequence, and wait until the previous persistent volume claim is restored before restoring a new one.
    4. -
    +
      +
    • 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.
    • +
    @@ -3516,7 +3511,7 @@ SchedulingSpec (Optional) -

    scheduling spec for restoring pod.

    +

    Specifies the scheduling spec for the restoring pod.

    @@ -3545,7 +3540,7 @@ int (Optional) -

    number of seconds after the container has started before probe is initiated.

    +

    Specifies the number of seconds after the container has started before the probe is initiated.

    @@ -3557,8 +3552,8 @@ int (Optional) -

    number of seconds after which the probe times out. -defaults to 30 second, minimum value is 1.

    +

    Specifies the number of seconds after which the probe times out. +The default value is 30 seconds, and the minimum value is 1.

    @@ -3570,8 +3565,8 @@ int (Optional) -

    how often (in seconds) to perform the probe. -defaults to 5 second, minimum value is 1.

    +

    Specifies how often (in seconds) to perform the probe. +The default value is 5 seconds, and the minimum value is 1.

    @@ -3584,7 +3579,7 @@ ReadinessProbeExecAction -

    exec specifies the action to take.

    +

    Specifies the action to take.

    @@ -3612,7 +3607,7 @@ string -

    refer to container image.

    +

    Refers to the container image.

    @@ -3623,7 +3618,7 @@ string -

    refer to container command.

    +

    Refers to the container command.

    @@ -3654,7 +3649,7 @@ JobAction (Optional) -

    configuration for job action.

    +

    Specifies the configuration for a job action.

    @@ -3668,7 +3663,7 @@ ExecAction (Optional) -

    configuration for exec action.

    +

    Specifies the configuration for an exec action.

    @@ -3682,7 +3677,7 @@ ConnectionCredential (Optional) -

    credential template used for creating a connection credential

    +

    Defines the credential template used to create a connection credential.

    @@ -3696,8 +3691,9 @@ ReadinessProbe (Optional) -

    periodic probe of the service readiness. -controller will perform postReadyHooks of BackupScript.spec.restore after the service readiness when readinessProbe is configured.

    +

    Defines a periodic probe of the service readiness. +The controller will perform postReadyHooks of BackupScript.spec.restore +after the service readiness when readinessProbe is configured.

    @@ -3729,7 +3725,7 @@ JobActionSpec (Optional) -

    prepareData specifies the action to prepare data.

    +

    Specifies the action required to prepare data for restoration.

    @@ -3743,7 +3739,7 @@ JobActionSpec (Optional) -

    postReady specifies the action to execute after the data is ready.

    +

    Specifies the actions that should be executed after the data has been prepared and is ready for restoration.

    @@ -3796,7 +3792,8 @@ JobActionSpec -

    will restore the specified resources

    +(Optional) +

    Restores the specified resources.

    @@ -3852,7 +3849,7 @@ BackupRef -

    backup to be restored. The restore behavior based on the backup type:

    +

    Specifies the backup to be restored. The restore behavior is based on the backup type:

    1. Full: will be restored the full backup directly.
    2. Incremental: will be restored sequentially from the most recent full backup of this incremental backup.
    3. @@ -3870,7 +3867,7 @@ string (Optional) -

      restoreTime is the point in time for restoring.

      +

      Specifies the point in time for restoring.

      @@ -3884,7 +3881,7 @@ RestoreKubeResources (Optional) -

      restore the specified resources of kubernetes.

      +

      Restores the specified resources of Kubernetes.

      @@ -3898,7 +3895,7 @@ PrepareDataConfig (Optional) -

      configuration for the action of “prepareData” phase, including the persistent volume claims +

      Configuration for the action of “prepareData” phase, including the persistent volume claims that need to be restored and scheduling strategy of temporary recovery pod.

      @@ -3911,7 +3908,7 @@ string (Optional) -

      service account name which needs for recovery pod.

      +

      Specifies the service account name needed for recovery pod.

      @@ -3925,7 +3922,7 @@ ReadyConfig (Optional) -

      configuration for the action of “postReady” phase.

      +

      Configuration for the action of “postReady” phase.

      @@ -3939,7 +3936,7 @@ ReadyConfig (Optional) -

      list of environment variables to set in the container for restore and will be +

      List of environment variables to set in the container for restore. These will be merged with the env of Backup and ActionSet.

      The priority of merging is as follows: Restore env > Backup env > ActionSet env.

      @@ -3955,7 +3952,7 @@ Kubernetes core/v1.ResourceRequirements (Optional) -

      specified the required resources of restore job’s container.

      +

      Specifies the required resources of restore job’s container.

      @@ -4016,6 +4013,7 @@ RestorePhase (Optional) +

      Represents the current phase of the restore.

      @@ -4029,7 +4027,7 @@ Kubernetes meta/v1.Time (Optional) -

      Date/time when the restore started being processed.

      +

      Records the date/time when the restore started being processed.

      @@ -4043,7 +4041,7 @@ Kubernetes meta/v1.Time (Optional) -

      Date/time when the restore finished being processed.

      +

      Records the date/time when the restore finished being processed.

      @@ -4057,7 +4055,7 @@ Kubernetes meta/v1.Duration (Optional) -

      The duration time of restore execution. +

      Records the duration of the restore execution. When converted to a string, the form is “1h2m0.5s”.

      @@ -4072,7 +4070,7 @@ RestoreStatusActions (Optional) -

      recorded all restore actions performed.

      +

      Records all restore actions performed.

      @@ -4086,7 +4084,7 @@ RestoreStatusActions (Optional) -

      describe current state of restore API Resource, like warning.

      +

      Describes the current state of the restore API Resource, like warning.

      @@ -4114,7 +4112,7 @@ string -

      name describes the name of the recovery action based on the current backup.

      +

      Describes the name of the restore action based on the current backup.

      @@ -4125,7 +4123,7 @@ string -

      which backup’s restore action belongs to.

      +

      Describes which backup’s restore action belongs to.

      @@ -4136,7 +4134,7 @@ string -

      the execution object of the restore action.

      +

      Describes the execution object of the restore action.

      @@ -4148,7 +4146,7 @@ string (Optional) -

      message is a human-readable message indicating details about the object condition.

      +

      Provides a human-readable message indicating details about the object condition.

      @@ -4161,7 +4159,7 @@ RestoreActionStatus -

      the status of this action.

      +

      The status of this action.

      @@ -4175,7 +4173,7 @@ Kubernetes meta/v1.Time (Optional) -

      startTime is the start time for the restore job.

      +

      The start time of the restore job.

      @@ -4189,7 +4187,7 @@ Kubernetes meta/v1.Time (Optional) -

      endTime is the completion time for the restore job.

      +

      The completion time of the restore job.

      @@ -4220,7 +4218,7 @@ Kubernetes meta/v1.Time (Optional) -

      record the actions for prepareData phase.

      +

      Records the actions for the prepareData phase.

      @@ -4234,7 +4232,7 @@ Kubernetes meta/v1.Time (Optional) -

      record the actions for postReady phase.

      +

      Records the actions for the postReady phase.

      @@ -4264,7 +4262,7 @@ Kubernetes meta/v1.ObjectMeta -

      Standard object’s metadata. +

      Specifies the standard metadata for the object. 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 the metadata field. @@ -4280,7 +4278,7 @@ Kubernetes core/v1.PersistentVolumeClaimSpec -

      volumeClaimSpec defines the desired characteristics of a persistent volume claim.

      +

      Defines the desired characteristics of a persistent volume claim.

      @@ -4296,7 +4294,8 @@ VolumeConfig

      (Members of VolumeConfig are embedded into this type.)

      -

      describing the source volume of the backup targetVolumes and how to mount path in the restoring container.

      +

      Describes the source volume of the backup target volumes and the mount path in the restoring container. +At least one must exist for volumeSource and mountPath.

      @@ -4326,7 +4325,7 @@ VolumeConfig -

      templates is a list of volume claims.

      +

      Contains a list of volume claims.

      @@ -4337,8 +4336,8 @@ int32 -

      the replicas of persistent volume claim which need to be created and restored. -the format of created claim name is $(template-name)-$(index).

      +

      Specifies the replicas of persistent volume claim that need to be created and restored. +The format of the created claim name is $(template-name)-$(index).

      @@ -4349,8 +4348,8 @@ int32 -

      the starting index for the created persistent volume claim by according to template. -minimum is 0.

      +

      Specifies the starting index for the created persistent volume claim according to the template. +The minimum value is 0.

      @@ -4390,7 +4389,7 @@ Kubernetes core/v1.ResourceRequirements (Optional) -

      resources specifies the resource required by container. +

      Specifies the resource required by container. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/

      @@ -4402,7 +4401,7 @@ More info: ScheduleStatus)

      -

      SchedulePhase defines the phase of schedule

      +

      SchedulePhase represents the phase of a schedule.

      @@ -4441,7 +4440,7 @@ bool @@ -4452,7 +4451,7 @@ string @@ -4463,7 +4462,7 @@ string @@ -4478,8 +4477,8 @@ RetentionPeriod
      (Optional) -

      enabled specifies whether the backup schedule is enabled or not.

      +

      Specifies whether the backup schedule is enabled or not.

      -

      backupMethod specifies the backup method name that is defined in backupPolicy.

      +

      Specifies the backup method name that is defined in backupPolicy.

      -

      the cron expression for schedule, the timezone is in UTC. +

      Specifies the cron expression for the schedule. The timezone is in UTC. see https://en.wikipedia.org/wiki/Cron.

      (Optional) -

      retentionPeriod determines a duration up to which the backup should be kept. -controller will remove all backups that are older than the RetentionPeriod. +

      Determines the duration for which the backup should be kept. +KubeBlocks will remove all backups that are older than the RetentionPeriod. For example, RetentionPeriod of 30d will keep only the backups of last 30 days. Sample duration format:

        @@ -4500,7 +4499,7 @@ Sample duration format:

        (Appears on:BackupScheduleStatus)

        -

        ScheduleStatus defines the status of each schedule.

        +

        ScheduleStatus represents the status of each schedule.

        @@ -4521,7 +4520,7 @@ SchedulePhase @@ -4533,7 +4532,7 @@ string @@ -4547,7 +4546,7 @@ Kubernetes meta/v1.Time @@ -4561,7 +4560,7 @@ Kubernetes meta/v1.Time @@ -4592,7 +4591,7 @@ Kubernetes meta/v1.Time @@ -4604,8 +4603,8 @@ map[string]string @@ -4618,7 +4617,7 @@ string @@ -4634,8 +4633,8 @@ Kubernetes core/v1.Affinity @@ -4649,9 +4648,9 @@ refer to https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/

        +

        Describes how a group of pods ought to spread across topology +domains. The scheduler will schedule pods in a way which abides by the constraints. +Refer to https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/

        @@ -4663,8 +4662,8 @@ string @@ -4693,9 +4692,9 @@ bool @@ -4707,7 +4706,7 @@ int32 @@ -4738,8 +4737,8 @@ that should be mounted in backup workload.

        @@ -4753,7 +4752,7 @@ be mounted on the backup job.

        @@ -4808,8 +4807,8 @@ string @@ -4821,7 +4820,7 @@ string @@ -4849,7 +4848,8 @@ string @@ -4860,7 +4860,8 @@ string @@ -4872,7 +4873,7 @@ string @@ -4884,7 +4885,7 @@ string
        (Optional) -

        phase describes the phase of the schedule.

        +

        Describes the phase of the schedule.

        (Optional) -

        failureReason is an error that caused the backup to fail.

        +

        Represents an error that caused the backup to fail.

        (Optional) -

        lastScheduleTime records the last time the backup was scheduled.

        +

        Records the last time the backup was scheduled.

        (Optional) -

        lastSuccessfulTime records the last time the backup was successfully completed.

        +

        Records the last time the backup was successfully completed.

        (Optional) -

        the restoring pod’s tolerations.

        +

        Specifies the tolerations for the restoring pod.

        (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. +

        Defines a selector which must be true for the pod to fit on a node. +The selector 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/

        (Optional) -

        nodeName is a request to schedule this pod onto a specific node. If it is non-empty, +

        Specifies 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.

        (Optional) -

        affinity is a group of affinity scheduling rules. -refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

        +

        Contains a group of affinity scheduling rules. +Refer to https://kubernetes.io/docs/concepts/configuration/assign-pod-node/

        (Optional) -

        If specified, the pod will be dispatched by specified scheduler. -If not specified, the pod will be dispatched by default scheduler.

        +

        Specifies the scheduler to dispatch the pod. +If not specified, the pod will be dispatched by the default scheduler.

        (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.

        +

        Determines if the backup progress should be synchronized. If set to true, +a sidecar container will be instantiated to synchronize the backup progress with the +Backup Custom Resource (CR) status.

        (Optional) -

        intervalSeconds specifies the interval seconds to sync the backup progress.

        +

        Defines the interval in seconds for synchronizing the backup progress.

        (Optional) -

        Volumes indicates the list of volumes of targeted application that should -be mounted on the backup job.

        +

        Specifies the list of volumes of targeted application that should be mounted +on the backup workload.

        (Optional) -

        volumeMounts specifies the mount for the volumes specified in Volumes section.

        +

        Specifies the mount for the volumes specified in volumes section.

        (Optional) -

        volumeSource describes the volume will be restored from the specified volume of the backup targetVolumes. -required if the backup uses volume snapshot.

        +

        Describes the volume that will be restored from the specified volume of the backup targetVolumes. +This is required if the backup uses a volume snapshot.

        (Optional) -

        mountPath path within the restoring container at which the volume should be mounted.

        +

        Specifies the path within the restoring container at which the volume should be mounted.

        -

        name is the name of the volume snapshot.

        +(Optional) +

        The name of the volume snapshot.

        -

        contentName is the name of the volume snapshot content.

        +(Optional) +

        The name of the volume snapshot content.

        (Optional) -

        volumeName is the name of the volume.

        +

        The name of the volume.

        (Optional) -

        size is the size of the volume snapshot.

        +

        The size of the volume snapshot.