Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API for GEP-3171 #3283

Merged
merged 69 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
e6beaef
Create index.md
jakebennert Jun 29, 2024
2506395
Create metadata.yaml
jakebennert Jun 29, 2024
377eb60
Update index.md
jakebennert Jun 30, 2024
6ad6511
Update metadata.yaml
jakebennert Jun 30, 2024
dd1f61b
Remove 'omitempty' from Fraction fields
jakebennert Jun 30, 2024
bf6644a
Merge branch 'kubernetes-sigs:main' into main
jakebennert Jul 22, 2024
494d1ac
Split MirrorPercent into two fields: MirrorPercent and MirrorFraction.
jakebennert Jul 22, 2024
d998621
Update index.md
jakebennert Jul 22, 2024
58b8d45
Add config examples.
jakebennert Jul 22, 2024
4768da7
Add Existing Support Table
jakebennert Jul 22, 2024
9c8f672
Update field names to avoid 'stuttering' in names.
jakebennert Jul 22, 2024
dbbe4de
Update geps/gep-3171/index.md
jakebennert Jul 29, 2024
b08b09a
Merge branch 'kubernetes-sigs:main' into main
jakebennert Aug 20, 2024
6f0b6f9
Add Fraction type
jakebennert Aug 20, 2024
219602f
Add percent and fraction to HTTPRequestMirrorFilter
jakebennert Aug 20, 2024
205726a
Update apis/v1/httproute_types.go
jakebennert Aug 21, 2024
dc6c3e4
Update apis/v1/shared_types.go
jakebennert Aug 21, 2024
1b8f84d
Add CEL validation to Fraction type
jakebennert Aug 21, 2024
b7d943c
Add CEL validation to HttpRequestMirrorFilter
jakebennert Aug 21, 2024
a38970f
Add CEL validation test for HTTPRequestMirrorFilter
jakebennert Aug 21, 2024
fece6d3
Ran /hack/update-codegen.sh
jakebennert Aug 21, 2024
a121d72
Update httproute_experimental_test.go
jakebennert Aug 22, 2024
8ac9286
Update httproute_experimental_test.go
jakebennert Aug 22, 2024
ce85d11
Update httproute_experimental_test.go
jakebennert Aug 22, 2024
1ae9c38
Update httproute_types.go
jakebennert Aug 22, 2024
2647fee
Reran /hack/update-codegen.sh
jakebennert Aug 22, 2024
4af86bc
Update httproute_experimental_test.go
jakebennert Aug 22, 2024
639dd42
Make Denominator field a pointer to distinguish between 0 and unset
jakebennert Aug 22, 2024
d1142d7
Change Percent to be a pointer to distinguish between 0 and unset
jakebennert Aug 23, 2024
2fc563b
Update httproute_experimental_test.go
jakebennert Aug 23, 2024
b7b9e5d
Update httproute_experimental_test.go
jakebennert Aug 23, 2024
5ef895e
Format httproute_types.go
jakebennert Aug 23, 2024
55bdd99
Make Fraction a pointer
jakebennert Aug 23, 2024
a7ec37b
Update httproute_experimental_test.go
jakebennert Aug 23, 2024
785c868
Reran hack/update-codegen.sh
jakebennert Aug 23, 2024
9b9141a
Updating to test CEL validation
jakebennert Aug 23, 2024
0d950da
Updating to test CEL validation
jakebennert Aug 23, 2024
92c3a20
Update httproute_types.go
jakebennert Aug 23, 2024
316965a
Update httproute_experimental_test.go
jakebennert Aug 23, 2024
ef85ee0
Update httproute_experimental_test.go
jakebennert Aug 23, 2024
f9d6687
Update httproute_experimental_test.go
jakebennert Aug 23, 2024
f64e4b7
Update httproute_types.go
jakebennert Aug 23, 2024
e92b89d
Update httproute_experimental_test.go
jakebennert Aug 23, 2024
7beabbb
Update httproute_types.go
jakebennert Aug 23, 2024
c66e899
Update httproute_types.go
jakebennert Aug 23, 2024
faaac18
testing
jakebennert Aug 23, 2024
8758c99
Update httproute_types.go
jakebennert Aug 23, 2024
502f23b
Ran hack/update-codegen.sh
jakebennert Aug 23, 2024
6812812
format shared_types.go
jakebennert Aug 23, 2024
885055d
Update httproute_types.go
jakebennert Aug 23, 2024
3118321
Update httproute_experimental_test.go
jakebennert Aug 23, 2024
03ad867
Update httproute_types.go
jakebennert Aug 23, 2024
cb721ba
Update httproute_types.go
jakebennert Aug 23, 2024
45190cf
reran hack/update-codegen.sh
jakebennert Aug 23, 2024
48fa58a
Update httproute_types.go
jakebennert Aug 23, 2024
0e10e93
Update httproute_experimental_test.go
jakebennert Aug 23, 2024
61ec05c
Reran hack/update-codegen.sh
jakebennert Aug 23, 2024
bd2f90e
Added RequestMirror validation to GRPCRoute
jakebennert Aug 26, 2024
11cec9b
Create grcproute_experimental_test.go
jakebennert Aug 26, 2024
9fe610b
Update grcproute_experimental_test.go
jakebennert Aug 26, 2024
a50077c
Update grpcroute_types.go
jakebennert Aug 26, 2024
ed12d84
Update grcproute_experimental_test.go
jakebennert Aug 26, 2024
4bc5e27
Ran hack/update-codegen.sh
jakebennert Aug 26, 2024
f12e175
Update grcproute_experimental_test.go
jakebennert Aug 26, 2024
ee4f5f5
Update grcproute_experimental_test.go
jakebennert Aug 26, 2024
ba8993d
Update Copyright Year
jakebennert Aug 26, 2024
ad9ecbb
Update pkg/test/cel/grcproute_experimental_test.go
jakebennert Aug 26, 2024
bb5a858
Update httproute_experimental_test.go
jakebennert Aug 26, 2024
ddeab1a
Update grcproute_experimental_test.go
jakebennert Aug 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions apis/applyconfiguration/apis/v1/fraction.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions apis/applyconfiguration/apis/v1/httprequestmirrorfilter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions apis/applyconfiguration/internal/internal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apis/applyconfiguration/utils.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apis/v1/grpcroute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ type GRPCRouteFilter struct {
// Support: Extended
//
// +optional
//
// <gateway:experimental:validation:XValidation:message="Only one of percent or fraction may be specified in HTTPRequestMirrorFilter",rule="!(has(self.percent) && has(self.fraction))">
RequestMirror *HTTPRequestMirrorFilter `json:"requestMirror,omitempty"`

// ExtensionRef is an optional, implementation-specific extension to the
Expand Down
25 changes: 25 additions & 0 deletions apis/v1/httproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,8 @@ type HTTPRouteFilter struct {
// Support: Extended
//
// +optional
//
// <gateway:experimental:validation:XValidation:message="Only one of percent or fraction may be specified in HTTPRequestMirrorFilter",rule="!(has(self.percent) && has(self.fraction))">
jakebennert marked this conversation as resolved.
Show resolved Hide resolved
RequestMirror *HTTPRequestMirrorFilter `json:"requestMirror,omitempty"`

// RequestRedirect defines a schema for a filter that responds to the
Expand Down Expand Up @@ -1153,6 +1155,29 @@ type HTTPRequestMirrorFilter struct {
//
// Support: Implementation-specific for any other resource
BackendRef BackendObjectReference `json:"backendRef"`

jakebennert marked this conversation as resolved.
Show resolved Hide resolved
// Percent represents the percentage of requests that should be
// mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
// requests) and its maximum value is 100 (indicating 100% of requests).
//
// Only one of Fraction or Percent may be specified. If neither field
// is specified, 100% of requests will be mirrored.
//
// +optional
// +kubebuilder:validation:Minimum=0
// +kubebuilder:validation:Maximum=100
// <gateway:experimental>
Percent *int32 `json:"percent,omitempty"`

// Fraction represents the fraction of requests that should be
// mirrored to BackendRef.
//
// Only one of Fraction or Percent may be specified. If neither field
// is specified, 100% of requests will be mirrored.
//
// +optional
// <gateway:experimental>
Fraction Fraction `json:"fraction,omitempty"`
}

// HTTPBackendRef defines how a HTTPRoute forwards a HTTP request.
Expand Down
11 changes: 11 additions & 0 deletions apis/v1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -855,3 +855,14 @@ const (
// Support: Extended
PermanentCookieLifetimeType CookieLifetimeType = "Permanent"
)

// +kubebuilder:validation:XValidation:message="numerator must be less than or equal to denominator",rule="self.numerator <= self.denominator"
type Fraction struct {
jakebennert marked this conversation as resolved.
Show resolved Hide resolved
// +kubebuilder:validation:Minimum=0
Numerator int32 `json:"numerator"`

// +optional
// +kubebuilder:default=100
// +kubebuilder:validation:Minimum=1
Denominator *int32 `json:"denominator,omitempty"`
}
26 changes: 26 additions & 0 deletions apis/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading