Skip to content

Commit

Permalink
refactor: use default limits field for rlp controller tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KevFan committed Mar 15, 2024
1 parent 698d164 commit 906dc2c
Show file tree
Hide file tree
Showing 5 changed files with 326 additions and 272 deletions.
8 changes: 5 additions & 3 deletions api/v1beta2/ratelimitpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,17 @@ type RateLimitPolicySpec struct {
// +kubebuilder:validation:XValidation:rule="self.kind == 'HTTPRoute' || self.kind == 'Gateway'",message="Invalid targetRef.kind. The only supported values are 'HTTPRoute' and 'Gateway'"
TargetRef gatewayapiv1alpha2.PolicyTargetReference `json:"targetRef"`

// Defaults define explicit default values for this policy and for policies inheriting this policy
// Defaults define explicit default values for this policy and for policies inheriting this policy.
// Defaults are mutually exclusive with implicit defaults defined by CommonSpec.
// +optional
Defaults CommonSpec `json:"defaults,omitempty"`

// Implicit default
// CommonSpec defines implicit default values for this policy and for policies inheriting this policy.
// CommonSpec is mutually exclusive with explicit defaults defined by Defaults.
CommonSpec `json:""`
}

// CommonSpec contains fields
// CommonSpec contains common shared fields.
type CommonSpec struct {
// Limits holds the struct of limits indexed by a unique name
// +optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ metadata:
capabilities: Basic Install
categories: Integration & Delivery
containerImage: quay.io/kuadrant/kuadrant-operator:latest
createdAt: "2024-03-13T11:55:14Z"
createdAt: "2024-03-14T15:29:50Z"
operators.operatorframework.io/builder: operator-sdk-v1.32.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/Kuadrant/kuadrant-operator
Expand Down
Loading

0 comments on commit 906dc2c

Please sign in to comment.