@@ -259,7 +259,7 @@ type Progress struct {
259259 // Step is the step name of progress
260260 Step string `json:"step,omitempty"`
261261 // Progress is the backup progress value
262- Progress int `json:"progress,omitempty"` // TODO(ideascf): type changed from float64 to int
262+ Progress int `json:"progress,omitempty"`
263263 // LastTransitionTime is the update time
264264 // +nullable
265265 LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
@@ -295,40 +295,41 @@ type BackupSpec struct {
295295 // Mode is the backup mode, such as snapshot backup or log backup.
296296 // +kubebuilder:default=snapshot
297297 Mode BackupMode `json:"backupMode,omitempty"`
298- // TikvGCLifeTime is to specify the safe gc life time for backup.
299- // The time limit during which data is retained for each GC, in the format of Go Duration.
300- // When a GC happens, the current time minus this value is the safe point.
301- TikvGCLifeTime * string `json:"tikvGCLifeTime,omitempty"`
302298 // StorageProvider configures where and how backups should be stored.
303299 // *** Note: This field should generally not be left empty, unless you are certain the storage provider
304300 // *** can be obtained from another source, such as a schedule CR.
305301 StorageProvider `json:",inline"`
302+ // BRConfig is the configs for BR
303+ // *** Note: This field should generally not be left empty, unless you are certain the BR config
304+ // *** can be obtained from another source, such as a schedule CR.
305+ BR * BRConfig `json:"br,omitempty"`
306+
306307 // The storageClassName of the persistent volume for Backup data storage.
307308 // Defaults to Kubernetes default storage class.
308309 // +optional
309310 StorageClassName * string `json:"storageClassName,omitempty"`
310311 // StorageSize is the request storage size for backup job
311312 StorageSize string `json:"storageSize,omitempty"`
312- // BRConfig is the configs for BR
313- // *** Note: This field should generally not be left empty, unless you are certain the BR config
314- // *** can be obtained from another source, such as a schedule CR.
315- BR * BRConfig `json:"br,omitempty"`
313+
316314 // CommitTs is the commit ts of the backup, snapshot ts for full backup or start ts for log backup.
317315 // Format supports TSO or datetime, e.g. '400036290571534337', '2018-05-11 01:42:23'.
318316 // Default is current timestamp.
319317 // +optional
320318 CommitTs string `json:"commitTs,omitempty"`
321319 // Subcommand is the subcommand for BR, such as start, stop, pause etc.
322320 // +optional
323- // +kubebuilder:validation:Enum:="log-start";"log-stop";"log-pause"
321+ // +kubebuilder:validation:Enum:="log-start";"log-stop";"log-pause";"log-resume";"log-truncate"
324322 LogSubcommand LogSubCommandType `json:"logSubcommand,omitempty"`
325323 // LogTruncateUntil is log backup truncate until timestamp.
326324 // Format supports TSO or datetime, e.g. '400036290571534337', '2018-05-11 01:42:23'.
325+ // It's required when LogSubcommand is "log-truncate".
327326 // +optional
328327 LogTruncateUntil string `json:"logTruncateUntil,omitempty"`
328+ // Deprecated: use LogSubcommand instead. it will be removed later.
329329 // LogStop indicates that will stop the log backup.
330330 // +optional
331331 LogStop bool `json:"logStop,omitempty"`
332+
332333 // Base tolerations of backup Pods, components may add more tolerations upon this respectively
333334 // +optional
334335 Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
@@ -349,6 +350,7 @@ type BackupSpec struct {
349350 UseKMS bool `json:"useKMS,omitempty"`
350351 // Specify service account of backup
351352 ServiceAccount string `json:"serviceAccount,omitempty"`
353+
352354 // CleanPolicy denotes whether to clean backup data when the object is deleted from the cluster, if not set, the backup data will be retained
353355 // +kubebuilder:validation:Enum:=Retain;OnFailure;Delete
354356 // +kubebuilder:default=Retain
0 commit comments