Skip to content

Commit

Permalink
add dispersal replica division preference
Browse files Browse the repository at this point in the history
Signed-off-by: Garrybest <[email protected]>
  • Loading branch information
Garrybest committed Oct 20, 2021
1 parent e9f4bde commit d0702ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ spec:
to WeightPreference.
enum:
- Aggregated
- Dispersal
- Weighted
type: string
replicaSchedulingType:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ spec:
to WeightPreference.
enum:
- Aggregated
- Dispersal
- Weighted
type: string
replicaSchedulingType:
Expand Down
7 changes: 5 additions & 2 deletions pkg/apis/policy/v1alpha1/propagation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ type ClusterAffinity struct {
ExcludeClusters []string `json:"exclude,omitempty"`
}

// ReplicaSchedulingType describes scheduling methods for the "replicas" in a resouce.
// ReplicaSchedulingType describes scheduling methods for the "replicas" in a resource.
type ReplicaSchedulingType string

const (
Expand All @@ -187,6 +187,9 @@ const (
// ReplicaDivisionPreferenceAggregated divides replicas into clusters as few as possible,
// while respecting clusters' resource availabilities during the division.
ReplicaDivisionPreferenceAggregated ReplicaDivisionPreference = "Aggregated"
// ReplicaDivisionPreferenceDispersal divides replicas into clusters as many as possible,
// while respecting clusters' resource availabilities during the division.
ReplicaDivisionPreferenceDispersal ReplicaDivisionPreference = "Dispersal"
// ReplicaDivisionPreferenceWeighted divides replicas by weight according to WeightPreference.
ReplicaDivisionPreferenceWeighted ReplicaDivisionPreference = "Weighted"
)
Expand All @@ -207,7 +210,7 @@ type ReplicaSchedulingStrategy struct {
// "Aggregated" divides replicas into clusters as few as possible,
// while respecting clusters' resource availabilities during the division.
// "Weighted" divides replicas by weight according to WeightPreference.
// +kubebuilder:validation:Enum=Aggregated;Weighted
// +kubebuilder:validation:Enum=Aggregated;Dispersal;Weighted
// +optional
ReplicaDivisionPreference ReplicaDivisionPreference `json:"replicaDivisionPreference,omitempty"`

Expand Down

0 comments on commit d0702ae

Please sign in to comment.