Skip to content

Commit

Permalink
RLP CRD v2: WhenConditionOperator only eq and neq
Browse files Browse the repository at this point in the history
  • Loading branch information
eguzki committed May 17, 2023
1 parent fe9ce18 commit 23948f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/v1beta2/ratelimitpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
// +kubebuilder:validation:MaxLength=253
type ContextSelector string

// +kubebuilder:validation:Enum:=eq;neq;incl;excl;matches
// +kubebuilder:validation:Enum:=eq;neq
type WhenConditionOperator string

// +kubebuilder:validation:Enum:=second;minute;hour;day
Expand All @@ -64,11 +64,10 @@ type WhenCondition struct {
Selector ContextSelector `json:"selector"`

// The binary operator to be applied to the content fetched from the selector
// Possible values are: "eq" (equal to), "neq" (not equal to), "incl" (includes; for arrays), "excl" (excludes; for arrays), "matches" (regex)
// Possible values are: "eq" (equal to), "neq" (not equal to)
Operator WhenConditionOperator `json:"operator"`

// The value of reference for the comparison.
// If used with the "matches" operator, the value must compile to a valid Golang regex.
Value string `json:"value"`
}

Expand Down

0 comments on commit 23948f5

Please sign in to comment.