Skip to content

Commit

Permalink
*: adjust federation restore cr
Browse files Browse the repository at this point in the history
Signed-off-by: BornChanger <[email protected]>
  • Loading branch information
BornChanger committed Jul 15, 2023
1 parent fc5081e commit 525ab02
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/api-references/federation-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,39 @@ string
</tr>
<tr>
<td>
<code>volumeType</code></br>
<em>
string
</em>
</td>
<td>
<p>VolumeType is type of the restored volume</p>
</td>
</tr>
<tr>
<td>
<code>volumeIOPS</code></br>
<em>
int64
</em>
</td>
<td>
<p>VolumeIOPS is IOPS of the restored volume</p>
</td>
</tr>
<tr>
<td>
<code>volumeThroughput</code></br>
<em>
int64
</em>
</td>
<td>
<p>VolumeThroughput is bandwidth of the restored volume</p>
</td>
</tr>
<tr>
<td>
<code>backup</code></br>
<em>
<a href="#volumerestorememberbackupinfo">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,14 @@ spec:
type: string
tcNamespace:
type: string
volumeIOPS:
format: int64
type: integer
volumeThroughput:
format: int64
type: integer
volumeType:
type: string
type: object
type: array
template:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,14 @@ spec:
type: string
tcNamespace:
type: string
volumeIOPS:
format: int64
type: integer
volumeThroughput:
format: int64
type: integer
volumeType:
type: string
type: object
type: array
template:
Expand Down
8 changes: 8 additions & 0 deletions manifests/federation-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2849,6 +2849,14 @@ spec:
type: string
tcNamespace:
type: string
volumeIOPS:
format: int64
type: integer
volumeThroughput:
format: int64
type: integer
volumeType:
type: string
type: object
type: array
template:
Expand Down
8 changes: 8 additions & 0 deletions manifests/federation-crd_v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2853,6 +2853,14 @@ spec:
type: string
tcNamespace:
type: string
volumeIOPS:
format: int64
type: integer
volumeThroughput:
format: int64
type: integer
volumeType:
type: string
type: object
type: array
template:
Expand Down
21 changes: 21 additions & 0 deletions pkg/apis/federation/pingcap/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pkg/apis/federation/pingcap/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ type VolumeRestoreMemberCluster struct {
TCNamespace string `json:"tcNamespace,omitempty"`
// AZName is the available zone which the volume snapshots restore to
AZName string `json:"azName,omitempty"`
// VolumeType is type of the restored volume
VolumeType string `json:"volumeType,omitempty"`
// VolumeIOPS is IOPS of the restored volume
VolumeIOPS int64 `json:"volumeIOPS,omitempty"`
// VolumeThroughput is bandwidth of the restored volume
VolumeThroughput int64 `json:"volumeThroughput,omitempty"`
// Backup is the volume backup information
Backup VolumeRestoreMemberBackupInfo `json:"backup,omitempty"`
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/fedvolumebackup/restore/restore_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,9 @@ func (rm *restoreManager) buildRestoreMember(volumeRestoreName string, memberClu
ResourceRequirements: *template.ResourceRequirements.DeepCopy(),
Env: template.Env,
VolumeAZ: memberCluster.AZName,
VolumeType: memberCluster.VolumeType,
VolumeIOPS: memberCluster.VolumeIOPS,
VolumeThroughput: memberCluster.VolumeThroughput,
BR: template.BR.ToBRMemberConfig(memberCluster.TCName, memberCluster.TCNamespace),
Tolerations: template.Tolerations,
ToolImage: template.ToolImage,
Expand Down

0 comments on commit 525ab02

Please sign in to comment.