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:
|
operator:
|
||||||
description: Operator represents a conditionType's relationship
|
description: Operator represents a conditionType's relationship
|
||||||
to a conditionStatus. Valid operators are Equal, NotEqual.
|
to a conditionStatus. Valid operators are Equal, NotEqual.
|
||||||
|
enum:
|
||||||
|
- Equal
|
||||||
|
- NotEqual
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- conditionStatus
|
- conditionStatus
|
||||||
|
|
|
@ -70,6 +70,8 @@ type ClusterConditionRequirement struct {
|
||||||
ConditionType ConditionType `json:"conditionType"`
|
ConditionType ConditionType `json:"conditionType"`
|
||||||
// Operator represents a conditionType's relationship to a conditionStatus.
|
// Operator represents a conditionType's relationship to a conditionStatus.
|
||||||
// Valid operators are Equal, NotEqual.
|
// Valid operators are Equal, NotEqual.
|
||||||
|
//
|
||||||
|
// +kubebuilder:validation:Enum=Equal;NotEqual
|
||||||
// +required
|
// +required
|
||||||
Operator ClusterConditionOperator `json:"operator"`
|
Operator ClusterConditionOperator `json:"operator"`
|
||||||
// ConditionStatus specifies the ClusterStatue condition status.
|
// ConditionStatus specifies the ClusterStatue condition status.
|
||||||
|
|
|
@ -13,11 +13,10 @@ import (
|
||||||
context "context"
|
context "context"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
gomock "go.uber.org/mock/gomock"
|
|
||||||
|
|
||||||
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/cluster/v1alpha1"
|
v1alpha1 "github.com/karmada-io/karmada/pkg/apis/cluster/v1alpha1"
|
||||||
v1alpha2 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha2"
|
v1alpha2 "github.com/karmada-io/karmada/pkg/apis/work/v1alpha2"
|
||||||
framework "github.com/karmada-io/karmada/pkg/scheduler/framework"
|
framework "github.com/karmada-io/karmada/pkg/scheduler/framework"
|
||||||
|
gomock "go.uber.org/mock/gomock"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MockFramework is a mock of Framework interface.
|
// MockFramework is a mock of Framework interface.
|
||||||
|
|
Loading…
Reference in New Issue