diff --git a/charts/_crds/bases/policy.karmada.io_clusterpropagationpolicies.yaml b/charts/_crds/bases/policy.karmada.io_clusterpropagationpolicies.yaml index 35e4aa9b0bad..b6f2b250b638 100644 --- a/charts/_crds/bases/policy.karmada.io_clusterpropagationpolicies.yaml +++ b/charts/_crds/bases/policy.karmada.io_clusterpropagationpolicies.yaml @@ -224,6 +224,7 @@ spec: to WeightPreference. enum: - Aggregated + - Dispersal - Weighted type: string replicaSchedulingType: diff --git a/charts/_crds/bases/policy.karmada.io_propagationpolicies.yaml b/charts/_crds/bases/policy.karmada.io_propagationpolicies.yaml index 3a4c93e843f5..859278054438 100644 --- a/charts/_crds/bases/policy.karmada.io_propagationpolicies.yaml +++ b/charts/_crds/bases/policy.karmada.io_propagationpolicies.yaml @@ -220,6 +220,7 @@ spec: to WeightPreference. enum: - Aggregated + - Dispersal - Weighted type: string replicaSchedulingType: diff --git a/pkg/apis/policy/v1alpha1/propagation_types.go b/pkg/apis/policy/v1alpha1/propagation_types.go index 583365ec0a31..29d096d865f9 100644 --- a/pkg/apis/policy/v1alpha1/propagation_types.go +++ b/pkg/apis/policy/v1alpha1/propagation_types.go @@ -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 ( @@ -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" ) @@ -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"`