change StaticWeightList to optional

Signed-off-by: Garrybest <garrybest@foxmail.com>
This commit is contained in:
Garrybest 2021-10-30 20:33:47 +08:00
parent 87a3ac59d5
commit 561474f652
4 changed files with 2 additions and 8 deletions

View File

@ -384,8 +384,6 @@ spec:
- weight
type: object
type: array
required:
- staticWeightList
type: object
type: object
spreadConstraints:

View File

@ -380,8 +380,6 @@ spec:
- weight
type: object
type: array
required:
- staticWeightList
type: object
type: object
spreadConstraints:

View File

@ -173,8 +173,6 @@ spec:
- weight
type: object
type: array
required:
- staticWeightList
type: object
resourceSelectors:
description: ResourceSelectors used to select resources.

View File

@ -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