Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Xieql <[email protected]>
  • Loading branch information
Xieql committed Sep 6, 2023
1 parent dd57ce6 commit b22cb5c
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 215 deletions.
79 changes: 37 additions & 42 deletions docs/content/en/references/backups_v1alpha1_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ <h3 id="backup.kurator.dev/v1alpha1.Backup">Backup
</em>
</td>
<td>
<em>(Optional)</em>
<p>Destination indicates the clusters where backups should be performed.</p>
</td>
</tr>
Expand Down Expand Up @@ -328,7 +327,6 @@ <h3 id="backup.kurator.dev/v1alpha1.BackupSpec">BackupSpec
</em>
</td>
<td>
<em>(Optional)</em>
<p>Destination indicates the clusters where backups should be performed.</p>
</td>
</tr>
Expand Down Expand Up @@ -412,10 +410,6 @@ <h3 id="backup.kurator.dev/v1alpha1.BackupStatus">BackupStatus
</div>
<h3 id="backup.kurator.dev/v1alpha1.ClusterSelector">ClusterSelector
</h3>
<p>
(<em>Appears on:</em>
<a href="#backup.kurator.dev/v1alpha1.Destination">Destination</a>)
</p>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table td-content">
<table>
Expand Down Expand Up @@ -451,7 +445,7 @@ <h3 id="backup.kurator.dev/v1alpha1.Destination">Destination
<a href="#backup.kurator.dev/v1alpha1.MigrateSpec">MigrateSpec</a>,
<a href="#backup.kurator.dev/v1alpha1.RestoreSpec">RestoreSpec</a>)
</p>
<p>Destination defines a fleet or specific clusters.</p>
<p>Destination defines a target set of clusters, either through a fleet or by specifying them directly.</p>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table td-content">
<table>
Expand All @@ -471,25 +465,10 @@ <h3 id="backup.kurator.dev/v1alpha1.Destination">Destination
</td>
<td>
<em>(Optional)</em>
<p>Fleet is the name of fleet.
The field, in combination with ClusterSelector, can determine a set of clusters.
In addition to this approach, users can also directly specify clusters through the field Clusters.</p>
</td>
</tr>
<tr>
<td>
<code>clusterSelector</code><br>
<em>
<a href="#backup.kurator.dev/v1alpha1.ClusterSelector">
ClusterSelector
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>ClusterSelector specifies the selectors to select the clusters within the fleet.
If unspecified, all clusters in the fleet will be selected.
The field will only take effect when Fleet is set.</p>
<p>Fleet represents the name of a fleet which determines a set of clusters.
If Fleet is set, it will be used to determine the target clusters.
If users wish to specify clusters directly, they can use the Clusters field.
Note: If both Fleet and Clusters are set, the resulting set will be the union of both.</p>
</td>
</tr>
<tr>
Expand All @@ -503,8 +482,8 @@ <h3 id="backup.kurator.dev/v1alpha1.Destination">Destination
</td>
<td>
<em>(Optional)</em>
<p>Clusters determine a set of clusters as destination clusters.
The field will only take effect when Fleet is not set.</p>
<p>Clusters allows users to directly specify a set of destination clusters.
If both Fleet and Clusters are set, the resulting set will be the union of both.</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -638,7 +617,7 @@ <h3 id="backup.kurator.dev/v1alpha1.MigratePolicy">MigratePolicy
<td>
<em>(Optional)</em>
<p>ResourceFilter specifies the resources to be included in the migration.
If not set, all resources in will be migrated.</p>
If not set, all resources in source cluster will be migrated.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -678,8 +657,8 @@ <h3 id="backup.kurator.dev/v1alpha1.MigratePolicy">MigratePolicy
<td>
<code>migrateStatus</code><br>
<em>
<a href="#backup.kurator.dev/v1alpha1.ReserveStatusSpec">
ReserveStatusSpec
<a href="#backup.kurator.dev/v1alpha1.PreserveStatus">
PreserveStatus
</a>
</em>
</td>
Expand Down Expand Up @@ -839,13 +818,16 @@ <h3 id="backup.kurator.dev/v1alpha1.MigrateStatus">MigrateStatus
</table>
</div>
</div>
<h3 id="backup.kurator.dev/v1alpha1.ReserveStatusSpec">ReserveStatusSpec
<h3 id="backup.kurator.dev/v1alpha1.PreserveStatus">PreserveStatus
</h3>
<p>
(<em>Appears on:</em>
<a href="#backup.kurator.dev/v1alpha1.MigratePolicy">MigratePolicy</a>,
<a href="#backup.kurator.dev/v1alpha1.RestorePolicy">RestorePolicy</a>)
</p>
<p>PreserveStatus specifies which resources we should restore the status field.
The logic implemented is that everything in the included list except those items in the excluded list should be included.
&lsquo;*&rsquo; in the includes list means &ldquo;include everything&rdquo;, but it is not valid in the exclude list.</p>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table td-content">
<table>
Expand All @@ -865,8 +847,13 @@ <h3 id="backup.kurator.dev/v1alpha1.ReserveStatusSpec">ReserveStatusSpec
</td>
<td>
<em>(Optional)</em>
<p>IncludedResources specifies the resources to which will restore the status.
If empty, it applies to all resources.</p>
<p>IncludedResources determines which resources will have their status restored.
By default, if this list is empty, it means the status for ALL resources will be restored.
For example:
- If you want to restore the status only for deployments and services, set:
includedResources: [&ldquo;deployments&rdquo;, &ldquo;services&rdquo;]
- If you leave it empty, the status for all resources will be restored.
Note: If a resource is listed in both IncludedResources and ExcludedResources, the exclusion takes precedence.</p>
</td>
</tr>
<tr>
Expand All @@ -878,7 +865,13 @@ <h3 id="backup.kurator.dev/v1alpha1.ReserveStatusSpec">ReserveStatusSpec
</td>
<td>
<em>(Optional)</em>
<p>ExcludedResources specifies the resources to which will not restore the status.</p>
<p>ExcludedResources lists out the resources that will NOT have their status restored.
By default, if this list is empty, it means the status for NO resources will be excluded from restoration.
For instance:
- If you want to prevent restoring the status for pods and configmaps, set:
excludedResources: [&ldquo;pods&rdquo;, &ldquo;configmaps&rdquo;]
- If you leave it empty, no resources are excluded, and all will have their status restored (unless specified otherwise in IncludedResources).
Note: Exclusions listed here take precedence over inclusions. So, if a resource is listed in both, its status will NOT be restored.</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -1124,7 +1117,8 @@ <h3 id="backup.kurator.dev/v1alpha1.Restore">Restore
</td>
<td>
<em>(Optional)</em>
<p>Destination indicates the clusters where restore should be performed.</p>
<p>Destination indicates the clusters where restore should be performed.
if not set, all the clusters from Backup.spec.destination will perform restore.</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -1237,7 +1231,7 @@ <h3 id="backup.kurator.dev/v1alpha1.RestorePolicy">RestorePolicy
(<em>Appears on:</em>
<a href="#backup.kurator.dev/v1alpha1.RestoreSpec">RestoreSpec</a>)
</p>
<p>Note: partly copied from <a href="https://github.com/vmware-tanzu/velero/pkg/apis/restore_types.go">https://github.com/vmware-tanzu/velero/pkg/apis/restore_types.go</a>
<p>Note: partly copied from <a href="https://github.com/vmware-tanzu/velero/blob/v1.11.1/pkg/apis/velero/v1/restore_types.go">https://github.com/vmware-tanzu/velero/blob/v1.11.1/pkg/apis/velero/v1/restore_types.go</a>
RestorePolicy defines the specification for a Velero restore.</p>
<div class="md-typeset__scrollwrap">
<div class="md-typeset__table td-content">
Expand Down Expand Up @@ -1281,16 +1275,16 @@ <h3 id="backup.kurator.dev/v1alpha1.RestorePolicy">RestorePolicy
</tr>
<tr>
<td>
<code>restoreStatus</code><br>
<code>preserveStatus</code><br>
<em>
<a href="#backup.kurator.dev/v1alpha1.ReserveStatusSpec">
ReserveStatusSpec
<a href="#backup.kurator.dev/v1alpha1.PreserveStatus">
PreserveStatus
</a>
</em>
</td>
<td>
<em>(Optional)</em>
<p>ReserveStatus specifies which resources we should restore the status field.
<p>PreserveStatus specifies which resources we should restore the status field.
If unset, no status will be restored.</p>
</td>
</tr>
Expand Down Expand Up @@ -1349,7 +1343,8 @@ <h3 id="backup.kurator.dev/v1alpha1.RestoreSpec">RestoreSpec
</td>
<td>
<em>(Optional)</em>
<p>Destination indicates the clusters where restore should be performed.</p>
<p>Destination indicates the clusters where restore should be performed.
if not set, all the clusters from Backup.spec.destination will perform restore.</p>
</td>
</tr>
<tr>
Expand Down
33 changes: 10 additions & 23 deletions manifests/charts/fleet-manager/crds/backup.kurator.dev_backups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,10 @@ spec:
description: Destination indicates the clusters where backups should
be performed.
properties:
clusterSelector:
description: ClusterSelector specifies the selectors to select
the clusters within the fleet. If unspecified, all clusters
in the fleet will be selected. The field will only take effect
when Fleet is set.
properties:
matchLabels:
additionalProperties:
type: string
description: 'MatchLabels is a map of {key,value} pairs. A
single {key,value} in the matchLabels map is equivalent
to an element of matchExpressions, whose key field is "key",
the operator is "In", and the values array contains only
"value". More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors'
type: object
type: object
clusters:
description: Clusters determine a set of clusters as destination
clusters. The field will only take effect when Fleet is not
set.
description: Clusters allows users to directly specify a set of
destination clusters. If both Fleet and Clusters are set, the
resulting set will be the union of both.
items:
description: "ObjectReference contains enough information to
let you inspect or modify the referred object. --- New uses
Expand Down Expand Up @@ -134,10 +118,11 @@ spec:
type: object
type: array
fleet:
description: Fleet is the name of fleet. The field, in combination
with ClusterSelector, can determine a set of clusters. In addition
to this approach, users can also directly specify clusters through
the field Clusters.
description: 'Fleet represents the name of a fleet which determines
a set of clusters. If Fleet is set, it will be used to determine
the target clusters. If users wish to specify clusters directly,
they can use the Clusters field. Note: If both Fleet and Clusters
are set, the resulting set will be the union of both.'
type: string
type: object
policy:
Expand Down Expand Up @@ -378,6 +363,8 @@ spec:
and 2:10 PM every day. If not set, the backup will be executed only
once.
type: string
required:
- destination
type: object
status:
properties:
Expand Down
Loading

0 comments on commit b22cb5c

Please sign in to comment.