Skip to content

Commit

Permalink
Fed backup schedule (#5036)
Browse files Browse the repository at this point in the history
  • Loading branch information
BornChanger committed Jun 26, 2023
1 parent ebb269d commit 9ae7cc6
Show file tree
Hide file tree
Showing 32 changed files with 5,345 additions and 49 deletions.
4 changes: 2 additions & 2 deletions docs/api-references/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,6 @@ BackupSpec
</em>
</td>
<td>
<em>(Optional)</em>
<p>BackupTemplate is the specification of the backup structure to get scheduled.</p>
</td>
</tr>
Expand All @@ -592,6 +591,7 @@ BackupSpec
</em>
</td>
<td>
<em>(Optional)</em>
<p>LogBackupTemplate is the specification of the log backup structure to get scheduled.</p>
</td>
</tr>
Expand Down Expand Up @@ -3708,7 +3708,6 @@ BackupSpec
</em>
</td>
<td>
<em>(Optional)</em>
<p>BackupTemplate is the specification of the backup structure to get scheduled.</p>
</td>
</tr>
Expand All @@ -3722,6 +3721,7 @@ BackupSpec
</em>
</td>
<td>
<em>(Optional)</em>
<p>LogBackupTemplate is the specification of the log backup structure to get scheduled.</p>
</td>
</tr>
Expand Down
181 changes: 180 additions & 1 deletion docs/api-references/federation-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,66 @@ VolumeBackupScheduleSpec
<br/>
<br/>
<table>
<tr>
<td>
<code>schedule</code></br>
<em>
string
</em>
</td>
<td>
<p>Schedule specifies the cron string used for backup scheduling.</p>
</td>
</tr>
<tr>
<td>
<code>pause</code></br>
<em>
bool
</em>
</td>
<td>
<p>Pause means paused backupSchedule</p>
</td>
</tr>
<tr>
<td>
<code>maxBackups</code></br>
<em>
int32
</em>
</td>
<td>
<p>MaxBackups is to specify how many backups we want to keep
0 is magic number to indicate un-limited backups.
if MaxBackups and MaxReservedTime are set at the same time, MaxReservedTime is preferred
and MaxBackups is ignored.</p>
</td>
</tr>
<tr>
<td>
<code>maxReservedTime</code></br>
<em>
string
</em>
</td>
<td>
<p>MaxReservedTime is to specify how long backups we want to keep.</p>
</td>
</tr>
<tr>
<td>
<code>backupTemplate</code></br>
<em>
<a href="#volumebackupspec">
VolumeBackupSpec
</a>
</em>
</td>
<td>
<p>BackupTemplate is the specification of the volume backup structure to get scheduled.</p>
</td>
</tr>
</table>
</td>
</tr>
Expand Down Expand Up @@ -559,6 +619,7 @@ github.com/pingcap/tidb-operator/pkg/apis/pingcap/v1alpha1.StorageProvider
<p>
(Members of <code>StorageProvider</code> are embedded into this type.)
</p>
<p>StorageProvider configures where and how backups should be stored.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -738,6 +799,76 @@ string
<p>
<p>VolumeBackupScheduleSpec describes the attributes that a user creates on a volume backup schedule.</p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>schedule</code></br>
<em>
string
</em>
</td>
<td>
<p>Schedule specifies the cron string used for backup scheduling.</p>
</td>
</tr>
<tr>
<td>
<code>pause</code></br>
<em>
bool
</em>
</td>
<td>
<p>Pause means paused backupSchedule</p>
</td>
</tr>
<tr>
<td>
<code>maxBackups</code></br>
<em>
int32
</em>
</td>
<td>
<p>MaxBackups is to specify how many backups we want to keep
0 is magic number to indicate un-limited backups.
if MaxBackups and MaxReservedTime are set at the same time, MaxReservedTime is preferred
and MaxBackups is ignored.</p>
</td>
</tr>
<tr>
<td>
<code>maxReservedTime</code></br>
<em>
string
</em>
</td>
<td>
<p>MaxReservedTime is to specify how long backups we want to keep.</p>
</td>
</tr>
<tr>
<td>
<code>backupTemplate</code></br>
<em>
<a href="#volumebackupspec">
VolumeBackupSpec
</a>
</em>
</td>
<td>
<p>BackupTemplate is the specification of the volume backup structure to get scheduled.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="volumebackupschedulestatus">VolumeBackupScheduleStatus</h3>
<p>
(<em>Appears on:</em>
Expand All @@ -746,10 +877,58 @@ string
<p>
<p>VolumeBackupScheduleStatus represents the current status of a volume backup schedule.</p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>lastBackup</code></br>
<em>
string
</em>
</td>
<td>
<p>LastBackup represents the last backup.</p>
</td>
</tr>
<tr>
<td>
<code>lastBackupTime</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#time-v1-meta">
Kubernetes meta/v1.Time
</a>
</em>
</td>
<td>
<p>LastBackupTime represents the last time the backup was successfully created.</p>
</td>
</tr>
<tr>
<td>
<code>allBackupCleanTime</code></br>
<em>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#time-v1-meta">
Kubernetes meta/v1.Time
</a>
</em>
</td>
<td>
<p>AllBackupCleanTime represents the time when all backup entries are cleaned up</p>
</td>
</tr>
</tbody>
</table>
<h3 id="volumebackupspec">VolumeBackupSpec</h3>
<p>
(<em>Appears on:</em>
<a href="#volumebackup">VolumeBackup</a>)
<a href="#volumebackup">VolumeBackup</a>,
<a href="#volumebackupschedulespec">VolumeBackupScheduleSpec</a>)
</p>
<p>
<p>VolumeBackupSpec describes the attributes that a user creates on a volume backup.</p>
Expand Down
6 changes: 5 additions & 1 deletion manifests/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,10 @@ spec:
jsonPath: .spec.maxBackups
name: MaxBackups
type: integer
- description: How long backups we want to keep
jsonPath: .spec.maxReservedTime
name: MaxReservedTime
type: string
- description: The last backup CR name
jsonPath: .status.lastBackup
name: LastBackup
Expand Down Expand Up @@ -4232,7 +4236,7 @@ spec:
storageSize:
type: string
required:
- logBackupTemplate
- backupTemplate
- schedule
type: object
status:
Expand Down
Loading

0 comments on commit 9ae7cc6

Please sign in to comment.