diff --git a/cmd/fsm-bootstrap/crds/extension.gateway.flomesh.io_externalratelimits.yaml b/cmd/fsm-bootstrap/crds/extension.gateway.flomesh.io_externalratelimits.yaml index 2e263a88..de76f89d 100644 --- a/cmd/fsm-bootstrap/crds/extension.gateway.flomesh.io_externalratelimits.yaml +++ b/cmd/fsm-bootstrap/crds/extension.gateway.flomesh.io_externalratelimits.yaml @@ -60,17 +60,11 @@ spec: type: array x-kubernetes-list-type: set throttleHost: - description: ThrottleHosts is the list of hosts to be throttled - items: - description: HostPort is a host name with optional port number - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[0-9]{1,5})?$ - type: string - maxItems: 32 - minItems: 1 - type: array - x-kubernetes-list-type: set + description: ThrottleHost is the host to be throttled + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[0-9]{1,5})?$ + type: string type: object status: description: ExternalRateLimitStatus defines the observed state of ExternalRateLimit diff --git a/cmd/fsm-bootstrap/crds/extension.gateway.flomesh.io_requestterminations.yaml b/cmd/fsm-bootstrap/crds/extension.gateway.flomesh.io_requestterminations.yaml index 3e530814..f5a0d7c9 100644 --- a/cmd/fsm-bootstrap/crds/extension.gateway.flomesh.io_requestterminations.yaml +++ b/cmd/fsm-bootstrap/crds/extension.gateway.flomesh.io_requestterminations.yaml @@ -49,8 +49,8 @@ spec: description: RequestTerminationSpec defines the desired state of RequestTermination properties: response: - description: RequestTerminationResponse is the response when circuit - breaker triggered + description: RequestTerminationResponse is the response when request + termination triggered properties: body: default: Request termination triggered diff --git a/pkg/apis/extension/v1alpha1/externalratelimit.go b/pkg/apis/extension/v1alpha1/externalratelimit.go index 93386f7a..56c6186c 100644 --- a/pkg/apis/extension/v1alpha1/externalratelimit.go +++ b/pkg/apis/extension/v1alpha1/externalratelimit.go @@ -7,11 +7,8 @@ import ( // ExternalRateLimitSpec defines the desired state of ExternalRateLimit type ExternalRateLimitSpec struct { - // +listType=set - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=32 - // ThrottleHosts is the list of hosts to be throttled - ThrottleHosts []HostPort `json:"throttleHost,omitempty"` + // ThrottleHost is the host to be throttled + ThrottleHost HostPort `json:"throttleHost,omitempty"` // +optional // +listType=set diff --git a/pkg/apis/extension/v1alpha1/requesttermination.go b/pkg/apis/extension/v1alpha1/requesttermination.go index e6ef7718..04854a22 100644 --- a/pkg/apis/extension/v1alpha1/requesttermination.go +++ b/pkg/apis/extension/v1alpha1/requesttermination.go @@ -7,7 +7,7 @@ import ( // RequestTerminationSpec defines the desired state of RequestTermination type RequestTerminationSpec struct { - // RequestTerminationResponse is the response when circuit breaker triggered + // RequestTerminationResponse is the response when request termination triggered RequestTerminationResponse RequestTerminationResponse `json:"response,omitempty"` } diff --git a/pkg/apis/extension/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/extension/v1alpha1/zz_generated.deepcopy.go index 08dde23d..f3561305 100644 --- a/pkg/apis/extension/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/extension/v1alpha1/zz_generated.deepcopy.go @@ -361,11 +361,6 @@ func (in *ExternalRateLimitList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ExternalRateLimitSpec) DeepCopyInto(out *ExternalRateLimitSpec) { *out = *in - if in.ThrottleHosts != nil { - in, out := &in.ThrottleHosts, &out.ThrottleHosts - *out = make([]HostPort, len(*in)) - copy(*out, *in) - } if in.PassHeaders != nil { in, out := &in.PassHeaders, &out.PassHeaders *out = make([]v1.HeaderName, len(*in))