@@ -31,7 +31,6 @@ import (
31
31
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.phase`,description="The current status of the backup"
32
32
// +kubebuilder:printcolumn:name="BackupPath",type=string,JSONPath=`.status.backupPath`,description="The full path of backup data"
33
33
// +kubebuilder:printcolumn:name="BackupSize",type=string,JSONPath=`.status.backupSizeReadable`,description="The data size of the backup"
34
- // +kubebuilder:printcolumn:name="IncrementalBackupSize",type=string,JSONPath=`.status.incrementalBackupSizeReadable`,description="The real size of volume snapshot backup, only valid to volume snapshot backup",priority=10
35
34
// +kubebuilder:printcolumn:name="CommitTS",type=string,JSONPath=`.status.commitTs`,description="The commit ts of the backup"
36
35
// +kubebuilder:printcolumn:name="LogTruncateUntil",type=string,JSONPath=`.status.logSuccessTruncateUntil`,description="The log backup truncate until ts"
37
36
// +kubebuilder:printcolumn:name="Started",type=date,JSONPath=`.status.timeStarted`,description="The time at which the backup was started",priority=1
@@ -209,27 +208,8 @@ const (
209
208
BackupModeSnapshot BackupMode = "snapshot"
210
209
// BackupModeLog represents the log backup of tidb cluster.
211
210
BackupModeLog BackupMode = "log"
212
- // BackupModeVolumeSnapshot represents volume backup of tidb cluster.
213
- BackupModeVolumeSnapshot BackupMode = "volume-snapshot"
214
211
)
215
212
216
- // TiDBAccessConfig defines the configuration for access tidb cluster
217
- // +k8s:openapi-gen=true
218
- type TiDBAccessConfig struct {
219
- // Host is the tidb cluster access address
220
- Host string `json:"host"`
221
- // Port is the port number to use for connecting tidb cluster
222
- Port int32 `json:"port,omitempty"`
223
- // User is the user for login tidb cluster
224
- User string `json:"user,omitempty"`
225
- // SecretName is the name of secret which stores tidb cluster's password.
226
- SecretName string `json:"secretName"`
227
- // TLSClientSecretName is the name of secret which stores tidb server client certificate
228
- // Optional: Defaults to nil
229
- // +optional
230
- TLSClientSecretName * string `json:"tlsClientSecretName,omitempty"`
231
- }
232
-
233
213
// +k8s:openapi-gen=true
234
214
// CleanPolicyType represents the clean policy of backup data in remote storage
235
215
type CleanPolicyType string
@@ -273,11 +253,6 @@ type CleanOption struct {
273
253
BackoffEnabled bool `json:"backoffEnabled,omitempty"`
274
254
275
255
BatchDeleteOption `json:",inline"`
276
-
277
- // TODO(ideascf): remove this field, EBS volume snapshot backup is deprecated in v2
278
- // SnapshotsDeleteRatio represents the number of snapshots deleted per second
279
- // +kubebuilder:default=1
280
- // SnapshotsDeleteRatio float64 `json:"snapshotsDeleteRatio,omitempty"`
281
256
}
282
257
283
258
type Progress struct {
@@ -315,9 +290,6 @@ type BackupSpec struct {
315
290
// - BR_LOG_TO_TERM
316
291
// +optional
317
292
Env []corev1.EnvVar `json:"env,omitempty"`
318
- // TODO(ideascf): remove it in v2
319
- // From is the tidb cluster that needs to backup.
320
- From * TiDBAccessConfig `json:"from,omitempty"`
321
293
// Type is the backup type for tidb cluster and only used when Mode = snapshot, such as full, db, table.
322
294
Type BackupType `json:"backupType,omitempty"`
323
295
// Mode is the backup mode, such as snapshot backup or log backup.
@@ -357,19 +329,6 @@ type BackupSpec struct {
357
329
// LogStop indicates that will stop the log backup.
358
330
// +optional
359
331
LogStop bool `json:"logStop,omitempty"`
360
- // CalcSizeLevel determines how to size calculation of snapshots for EBS volume snapshot backup
361
- // +optional
362
- // +kubebuilder:default="all"
363
- CalcSizeLevel string `json:"calcSizeLevel,omitempty"`
364
- // FederalVolumeBackupPhase indicates which phase to execute in federal volume backup
365
- // +optional
366
- FederalVolumeBackupPhase FederalVolumeBackupPhase `json:"federalVolumeBackupPhase,omitempty"`
367
- // ResumeGcSchedule indicates whether resume gc and pd scheduler for EBS volume snapshot backup
368
- // +optional
369
- ResumeGcSchedule bool `json:"resumeGcSchedule,omitempty"`
370
- // TODO(ideascf): remove it in v2
371
- // DumplingConfig is the configs for dumpling
372
- Dumpling * DumplingConfig `json:"dumpling,omitempty"`
373
332
// Base tolerations of backup Pods, components may add more tolerations upon this respectively
374
333
// +optional
375
334
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
@@ -418,27 +377,6 @@ type BackupSpec struct {
418
377
VolumeBackupInitJobMaxActiveSeconds int `json:"volumeBackupInitJobMaxActiveSeconds,omitempty"`
419
378
}
420
379
421
- // FederalVolumeBackupPhase represents a phase to execute in federal volume backup
422
- type FederalVolumeBackupPhase string
423
-
424
- const (
425
- // FederalVolumeBackupInitialize means we should stop GC and PD schedule
426
- FederalVolumeBackupInitialize FederalVolumeBackupPhase = "initialize"
427
- // FederalVolumeBackupExecute means we should take volume snapshots for TiKV
428
- FederalVolumeBackupExecute FederalVolumeBackupPhase = "execute"
429
- // FederalVolumeBackupTeardown means we should resume GC and PD schedule
430
- FederalVolumeBackupTeardown FederalVolumeBackupPhase = "teardown"
431
- )
432
-
433
- // +k8s:openapi-gen=true
434
- // DumplingConfig contains config for dumpling
435
- type DumplingConfig struct {
436
- // Options means options for backup data to remote storage with dumpling.
437
- Options []string `json:"options,omitempty"`
438
- // Deprecated. Please use `Spec.TableFilter` instead. TableFilter means Table filter expression for 'db.table' matching
439
- TableFilter []string `json:"tableFilter,omitempty"`
440
- }
441
-
442
380
// +k8s:openapi-gen=true
443
381
// BRConfig contains config for BR
444
382
type BRConfig struct {
@@ -543,32 +481,13 @@ const (
543
481
BackupStopped BackupConditionType = "Stopped"
544
482
// BackupRestart means the backup was restarted, now just support snapshot backup
545
483
BackupRestart BackupConditionType = "Restart"
546
- // VolumeBackupInitialized means the volume backup has stopped GC and PD scheduler
547
- VolumeBackupInitialized BackupConditionType = "VolumeBackupInitialized"
548
- // VolumeBackupInitializeFailed means the volume backup initialize job failed
549
- VolumeBackupInitializeFailed BackupConditionType = "VolumeBackupInitializeFailed"
550
- // VolumeBackupSnapshotsCreated means the local volume snapshots created, and they won't be changed
551
- VolumeBackupSnapshotsCreated BackupConditionType = "VolumeBackupSnapshotsCreated"
552
- // VolumeBackupInitializeComplete means the volume backup has safely resumed GC and PD scheduler
553
- VolumeBackupInitializeComplete BackupConditionType = "VolumeBackupInitializeComplete"
554
- // VolumeBackupComplete means the volume backup has taken volume snapshots successfully
555
- VolumeBackupComplete BackupConditionType = "VolumeBackupComplete"
556
- // VolumeBackupFailed means the volume backup take volume snapshots failed
557
- VolumeBackupFailed BackupConditionType = "VolumeBackupFailed"
558
484
)
559
485
560
486
// BackupCondition describes the observed state of a Backup at a certain point.
561
487
type BackupCondition struct {
562
488
Command LogSubCommandType `json:"command,omitempty"`
563
489
564
490
metav1.Condition `json:",inline"`
565
- // TODO(ideascf): remove these fields
566
- // Type BackupConditionType `json:"type"`
567
- // Status corev1.ConditionStatus `json:"status"`
568
- // // +nullable
569
- // LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
570
- // Reason string `json:"reason,omitempty"`
571
- // Message string `json:"message,omitempty"`
572
491
}
573
492
574
493
// LogSubCommandType is the log backup subcommand type.
@@ -628,11 +547,6 @@ type BackupStatus struct {
628
547
BackupSizeReadable string `json:"backupSizeReadable,omitempty"`
629
548
// BackupSize is the data size of the backup.
630
549
BackupSize int64 `json:"backupSize,omitempty"`
631
- // the difference with IncrementalBackupSize is that its format is human readable
632
- IncrementalBackupSizeReadable string `json:"incrementalBackupSizeReadable,omitempty"`
633
- // IncrementalBackupSize is the incremental data size of the backup, it is only used for volume snapshot backup
634
- // it is the real size of volume snapshot backup
635
- IncrementalBackupSize int64 `json:"incrementalBackupSize,omitempty"`
636
550
// CommitTs is the commit ts of the backup, snapshot ts for full backup or start ts for log backup.
637
551
CommitTs string `json:"commitTs,omitempty"`
638
552
// LogSuccessTruncateUntil is log backup already successfully truncate until timestamp.
0 commit comments