diff --git a/charts/_crds/bases/policy.karmada.io_clusterpropagationpolicies.yaml b/charts/_crds/bases/policy.karmada.io_clusterpropagationpolicies.yaml index b33d8ddb9..7e6d3d433 100644 --- a/charts/_crds/bases/policy.karmada.io_clusterpropagationpolicies.yaml +++ b/charts/_crds/bases/policy.karmada.io_clusterpropagationpolicies.yaml @@ -384,8 +384,6 @@ spec: - weight type: object type: array - required: - - staticWeightList type: object type: object spreadConstraints: diff --git a/charts/_crds/bases/policy.karmada.io_propagationpolicies.yaml b/charts/_crds/bases/policy.karmada.io_propagationpolicies.yaml index 667d65a29..90b2bfc39 100644 --- a/charts/_crds/bases/policy.karmada.io_propagationpolicies.yaml +++ b/charts/_crds/bases/policy.karmada.io_propagationpolicies.yaml @@ -380,8 +380,6 @@ spec: - weight type: object type: array - required: - - staticWeightList type: object type: object spreadConstraints: diff --git a/charts/_crds/bases/policy.karmada.io_replicaschedulingpolicies.yaml b/charts/_crds/bases/policy.karmada.io_replicaschedulingpolicies.yaml index 6febc8419..27a7eff0e 100644 --- a/charts/_crds/bases/policy.karmada.io_replicaschedulingpolicies.yaml +++ b/charts/_crds/bases/policy.karmada.io_replicaschedulingpolicies.yaml @@ -173,8 +173,6 @@ spec: - weight type: object type: array - required: - - staticWeightList type: object resourceSelectors: description: ResourceSelectors used to select resources. diff --git a/pkg/apis/policy/v1alpha1/replicascheduling_types.go b/pkg/apis/policy/v1alpha1/replicascheduling_types.go index 164af0e4c..512818567 100644 --- a/pkg/apis/policy/v1alpha1/replicascheduling_types.go +++ b/pkg/apis/policy/v1alpha1/replicascheduling_types.go @@ -35,8 +35,8 @@ type ReplicaSchedulingSpec struct { // ClusterPreferences describes weight for each cluster or for each group of cluster. type ClusterPreferences struct { // StaticWeightList defines the static cluster weight. - // +required - StaticWeightList []StaticClusterWeight `json:"staticWeightList"` + // +optional + StaticWeightList []StaticClusterWeight `json:"staticWeightList,omitempty"` // DynamicWeight specifies the factor to generates dynamic weight list. // If specified, StaticWeightList will be ignored. // +kubebuilder:validation:Enum=AvailableReplicas