fix SpreadConstraint json tag issue in policy API (#46)

Signed-off-by: Kevin Wang <kevinwzf0126@gmail.com>
This commit is contained in:
Kevin Wang 2020-12-01 20:00:24 +08:00 committed by GitHub
parent 0a789c52ca
commit 160e961307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -197,11 +197,11 @@ spec:
description: SpreadConstraint represents the spread constraints
on resources.
properties:
maximumClusters:
maximum:
description: Maximum restricts the maximum number of cluster
units to be selected.
type: integer
minimumClusters:
minimum:
description: Minimum restricts the minimum number of cluster
units to be selected.
type: integer

View File

@ -22,6 +22,6 @@ spec:
exclude:
- cluster2
spreadConstraints:
- maximumClusters: 3
minimumClusters: 3
schedulerName: default
- maximum: 3
minimum: 3
schedulerName: default

View File

@ -105,11 +105,11 @@ type SpreadConstraint struct {
// Maximum restricts the maximum number of cluster units to be selected.
// +optional
Maximum int `json:"maximumClusters,omitempty"`
Maximum int `json:"maximum,omitempty"`
// Minimum restricts the minimum number of cluster units to be selected.
// +optional
Minimum int `json:"minimumClusters,omitempty"`
Minimum int `json:"minimum,omitempty"`
}
// ClusterAffinity represents the filter to select clusters.