Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backup: update design of destination #384

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions docs/content/en/references/backups_v1alpha1_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,8 @@ <h3 id="backup.kurator.dev/v1alpha1.Destination">Destination
</em>
</td>
<td>
<em>(Optional)</em>
<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.</p>
<p>Fleet represents the name of a fleet which determines a set of target clusters within the namespace.
This field is required to identify the context for cluster selection.</p>
</td>
</tr>
<tr>
Expand All @@ -481,9 +479,8 @@ <h3 id="backup.kurator.dev/v1alpha1.Destination">Destination
</td>
<td>
<em>(Optional)</em>
<p>Clusters allows users to directly specify a set of destination clusters.
It should be used exclusively to select clusters described within the Fleet.
If Fleet is set, it takes precedence over the Clusters field.</p>
<p>Clusters allows users to specify a subset of clusters within the selected fleet for targeted operations.
If not set, it implies that the operation is targeted at all clusters within the specified fleet.</p>
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ spec:
be performed.
properties:
clusters:
description: Clusters allows users to directly specify a set of
destination clusters. It should be used exclusively to select
clusters described within the Fleet. If Fleet is set, it takes
precedence over the Clusters field.
description: Clusters allows users to specify a subset of clusters
within the selected fleet for targeted operations. If not set,
it implies that the operation is targeted at all clusters within
the specified fleet.
items:
description: "ObjectReference contains enough information to
let you inspect or modify the referred object. --- New uses
Expand Down Expand Up @@ -120,10 +120,11 @@ spec:
type: array
fleet:
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.
a set of target clusters within the namespace. This field is
required to identify the context for cluster selection.
type: string
required:
- fleet
type: object
policy:
description: Policy are the rules defining how backups should be performed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,10 @@ spec:
to one or more TargetCluster.
properties:
clusters:
description: Clusters allows users to directly specify a set of
destination clusters. It should be used exclusively to select
clusters described within the Fleet. If Fleet is set, it takes
precedence over the Clusters field.
description: Clusters allows users to specify a subset of clusters
within the selected fleet for targeted operations. If not set,
it implies that the operation is targeted at all clusters within
the specified fleet.
items:
description: "ObjectReference contains enough information to
let you inspect or modify the referred object. --- New uses
Expand Down Expand Up @@ -383,19 +383,20 @@ spec:
type: array
fleet:
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.
a set of target clusters within the namespace. This field is
required to identify the context for cluster selection.
type: string
required:
- fleet
type: object
targetCluster:
description: TargetCluster represents the target clusters for migration.
properties:
clusters:
description: Clusters allows users to directly specify a set of
destination clusters. It should be used exclusively to select
clusters described within the Fleet. If Fleet is set, it takes
precedence over the Clusters field.
description: Clusters allows users to specify a subset of clusters
within the selected fleet for targeted operations. If not set,
it implies that the operation is targeted at all clusters within
the specified fleet.
items:
description: "ObjectReference contains enough information to
let you inspect or modify the referred object. --- New uses
Expand Down Expand Up @@ -461,10 +462,11 @@ spec:
type: array
fleet:
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.
a set of target clusters within the namespace. This field is
required to identify the context for cluster selection.
type: string
required:
- fleet
type: object
required:
- sourceCluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ spec:
will perform restore.
properties:
clusters:
description: Clusters allows users to directly specify a set of
destination clusters. It should be used exclusively to select
clusters described within the Fleet. If Fleet is set, it takes
precedence over the Clusters field.
description: Clusters allows users to specify a subset of clusters
within the selected fleet for targeted operations. If not set,
it implies that the operation is targeted at all clusters within
the specified fleet.
items:
description: "ObjectReference contains enough information to
let you inspect or modify the referred object. --- New uses
Expand Down Expand Up @@ -120,10 +120,11 @@ spec:
type: array
fleet:
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.
a set of target clusters within the namespace. This field is
required to identify the context for cluster selection.
type: string
required:
- fleet
type: object
policy:
description: Policy defines the customization rules for the restore.
Expand Down
14 changes: 6 additions & 8 deletions pkg/apis/backups/v1alpha1/common_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ import (

// Destination defines a target set of clusters, either through a fleet or by specifying them directly.
type Destination struct {
// 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.
// +optional
Fleet string `json:"fleet,omitempty"`
// Fleet represents the name of a fleet which determines a set of target clusters within the namespace.
// This field is required to identify the context for cluster selection.
// +required
Fleet string `json:"fleet"`

// Clusters allows users to directly specify a set of destination clusters.
// It should be used exclusively to select clusters described within the Fleet.
// If Fleet is set, it takes precedence over the Clusters field.
// Clusters allows users to specify a subset of clusters within the selected fleet for targeted operations.
// If not set, it implies that the operation is targeted at all clusters within the specified fleet.
// +optional
Clusters []*corev1.ObjectReference `json:"clusters,omitempty"`
}
Expand Down
Loading