set enum value for operator in Remedy API
Signed-off-by: changzhen <changzhen5@huawei.com>
This commit is contained in:
parent
4f75b3c577
commit
8a101ebcb7
|
@ -79,6 +79,9 @@ spec:
|
|||
operator:
|
||||
description: Operator represents a conditionType's relationship
|
||||
to a conditionStatus. Valid operators are Equal, NotEqual.
|
||||
enum:
|
||||
- Equal
|
||||
- NotEqual
|
||||
type: string
|
||||
required:
|
||||
- conditionStatus
|
||||
|
|
|
@ -70,6 +70,8 @@ type ClusterConditionRequirement struct {
|
|||
ConditionType ConditionType `json:"conditionType"`
|
||||
// Operator represents a conditionType's relationship to a conditionStatus.
|
||||
// Valid operators are Equal, NotEqual.
|
||||
//
|
||||
// +kubebuilder:validation:Enum=Equal;NotEqual
|
||||
// +required
|
||||
Operator ClusterConditionOperator `json:"operator"`
|
||||
// ConditionStatus specifies the ClusterStatue condition status.
|
||||
|
|
|
@ -13,11 +13,10 @@ import (
|
|||
context "context"
|
||||
reflect "reflect"
|
||||
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
|
||||
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/cluster/v1alpha1"
|
||||
v1alpha2 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha2"
|
||||
framework "github.com/karmada-io/karmada/pkg/scheduler/framework"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
)
|
||||
|
||||
// MockFramework is a mock of Framework interface.
|
||||
|
|
Loading…
Reference in New Issue