Skip to content

Commit 621b57d

Browse files
committed
Merge branch 'main' into fix-cert-validate
Signed-off-by: kkk777-7 <kota.kimura0725@gmail.com>
2 parents 96bc26c + b8d986c commit 621b57d

157 files changed

Lines changed: 4904 additions & 443 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ assignees: ''
1313
- [ ] update VERSION in release branch
1414
- [ ] wait for CI
1515
- [ ] push tag
16-
- [ ] Pusth tag https://github.com/envoyproxy/gateway/releases/tag/v1.x.x
16+
- [ ] Push tag https://github.com/envoyproxy/gateway/releases/tag/v1.x.x
1717
- [ ] wait for release CI
1818
- [ ] verify quickstart
1919
- [ ] update doc

api/v1alpha1/envoygateway_helpers.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,19 @@ var defaultRuntimeFlags = map[RuntimeFlag]bool{
128128
XDSNameSchemeV2: false,
129129
}
130130

131+
// IsEnabled checks if an experimental Gateway API is enabled in the EnvoyGateway configuration.
132+
func (f *GatewayAPIs) IsEnabled(api GatewayAPI) bool {
133+
if f != nil {
134+
for _, enable := range f.Enabled {
135+
if enable == api {
136+
return true
137+
}
138+
}
139+
}
140+
141+
return false
142+
}
143+
131144
// IsEnabled checks if a runtime flag is enabled in the EnvoyGateway configuration.
132145
func (f *RuntimeFlags) IsEnabled(flag RuntimeFlag) bool {
133146
if f != nil {

api/v1alpha1/envoygateway_types.go

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,36 @@ type EnvoyGatewaySpec struct {
100100
// +optional
101101
ExtensionAPIs *ExtensionAPISettings `json:"extensionApis,omitempty"`
102102

103+
// GatewayAPIs defines feature flags for experimental Gateway API resources.
104+
// These APIs live under the gateway.networking.x-k8s.io group and are opt-in.
105+
//
106+
// +optional
107+
// +notImplementedHide
108+
GatewayAPIs *GatewayAPIs `json:"gatewayAPIs,omitempty"`
109+
103110
// RuntimeFlags defines the runtime flags for Envoy Gateway.
104111
// Unlike ExtensionAPIs, these flags are temporary and will be removed in future releases once the related features are stable.
105112
RuntimeFlags *RuntimeFlags `json:"runtimeFlags,omitempty"`
106113
}
107114

115+
// GatewayAPI defines an experimental Gateway API resource that can be enabled.
116+
// +enum
117+
// +kubebuilder:validation:Enum=XListenerSet;XBackendTrafficPolicy
118+
type GatewayAPI string
119+
120+
const (
121+
// XListenerSet enables the Gateway API XListenerSet resource.
122+
// XListenerSet GatewayAPI = "XListenerSet"
123+
// XBackendTrafficPolicy enables the Gateway API XBackendTrafficPolicy resource.
124+
// XBackendTrafficPolicy GatewayAPI = "XBackendTrafficPolicy"
125+
)
126+
127+
// GatewayAPIs provides a mechanism to opt into experimental Gateway API resources.
128+
// These APIs are experimental today and are subject to change or removal as they mature.
129+
type GatewayAPIs struct {
130+
Enabled []GatewayAPI `json:"enabled,omitempty"`
131+
}
132+
108133
// RuntimeFlag defines a runtime flag used to guard breaking changes or risky experimental features in new Envoy Gateway releases.
109134
// A runtime flag may be enabled or disabled by default and can be toggled through the EnvoyGateway resource.
110135
// +enum

api/v1alpha1/httproutefilter_types.go

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ type HTTPRouteFilterSpec struct {
4444
DirectResponse *HTTPDirectResponseFilter `json:"directResponse,omitempty"`
4545
// +optional
4646
CredentialInjection *HTTPCredentialInjectionFilter `json:"credentialInjection,omitempty"`
47+
// Matches defines additional matching criteria for the HTTPRoute rule.
48+
// As with HTTPRouteRule.Matches, the rule is matched if any one match applies.
49+
// When both HTTPRouteRule.Matches and HTTPRouteFilter.Matches are set, the
50+
// effective matching is the logical AND of the two sets.
51+
//
52+
// +optional
53+
// +kubebuilder:validation:MaxItems=8
54+
Matches []HTTPRouteMatchFilter `json:"matches,omitempty"`
4755
}
4856

4957
// HTTPURLRewriteFilter define rewrites of HTTP URL components such as path and host
@@ -186,6 +194,55 @@ type InjectedCredential struct {
186194
// EG may support more credential types in the future, for example, OAuth2 access token retrieved by Client Credentials Grant flow.
187195
}
188196

197+
// HTTPRouteMatchFilter defines additional matching criteria for the HTTPRoute rule.
198+
// At least one matcher must be specified.
199+
//
200+
// +kubebuilder:validation:MinProperties=1
201+
type HTTPRouteMatchFilter struct {
202+
// Cookies is a list of cookie matchers evaluated against the HTTP request.
203+
// All specified matchers must match.
204+
//
205+
// +kubebuilder:validation:MinItems=1
206+
// +kubebuilder:validation:MaxItems=16
207+
Cookies []HTTPCookieMatch `json:"cookies,omitempty"`
208+
}
209+
210+
// CookieMatchType specifies the semantics of how cookie values should be compared.
211+
// Valid CookieMatchType values are "Exact" and "RegularExpression".
212+
//
213+
// +kubebuilder:validation:Enum=Exact;RegularExpression
214+
type CookieMatchType string
215+
216+
// CookieMatchType constants.
217+
const (
218+
// CookieMatchExact matches the exact value of the cookie.
219+
CookieMatchExact CookieMatchType = "Exact"
220+
// CookieMatchRegularExpression matches a regular expression against the value of the cookie.
221+
// The regex string must adhere to the syntax documented in https://github.com/google/re2/wiki/Syntax.
222+
CookieMatchRegularExpression CookieMatchType = "RegularExpression"
223+
)
224+
225+
// HTTPCookieMatch defines how to match a single cookie.
226+
type HTTPCookieMatch struct {
227+
// Type specifies how to match against the value of the cookie.
228+
//
229+
// +optional
230+
// +kubebuilder:default=Exact
231+
Type *CookieMatchType `json:"type,omitempty"`
232+
233+
// Name is the cookie name to evaluate.
234+
//
235+
// +kubebuilder:validation:MinLength=1
236+
// +kubebuilder:validation:MaxLength=256
237+
Name string `json:"name"`
238+
239+
// Value is the cookie value to be matched.
240+
//
241+
// +kubebuilder:validation:MinLength=1
242+
// +kubebuilder:validation:MaxLength=4096
243+
Value string `json:"value"`
244+
}
245+
189246
//+kubebuilder:object:root=true
190247

191248
// HTTPRouteFilterList contains a list of HTTPRouteFilter resources.

api/v1alpha1/shared_types.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,8 @@ type Tracing struct {
863863
// CustomTags defines the custom tags to add to each span.
864864
// If provider is kubernetes, pod name and namespace are added by default.
865865
//
866+
// Deprecated: Use Tags instead.
867+
//
866868
// +optional
867869
CustomTags map[string]CustomTag `json:"customTags,omitempty"`
868870
// Tags defines the custom tags to add to each span.
@@ -998,6 +1000,30 @@ type HTTPHeaderFilter struct {
9981000
// +kubebuilder:validation:MaxItems=64
9991001
Add []gwapiv1.HTTPHeader `json:"add,omitempty"`
10001002

1003+
// AddIfAbsent adds the given header(s) (name, value) to the request/response
1004+
// only if the header does not already exist. Unlike Add which appends to
1005+
// existing values, this is a no-op if the header is already present.
1006+
//
1007+
// Input:
1008+
// GET /foo HTTP/1.1
1009+
// my-header: foo
1010+
//
1011+
// Config:
1012+
// addIfAbsent:
1013+
// - name: "my-header"
1014+
// value: "bar"
1015+
//
1016+
// Output:
1017+
// GET /foo HTTP/1.1
1018+
// my-header: foo
1019+
//
1020+
// +optional
1021+
// +listType=map
1022+
// +listMapKey=name
1023+
// +kubebuilder:validation:MinItems=1
1024+
// +kubebuilder:validation:MaxItems=64
1025+
AddIfAbsent []gwapiv1.HTTPHeader `json:"addIfAbsent,omitempty"`
1026+
10011027
// Remove the given header(s) from the HTTP request before the action. The
10021028
// value of Remove is a list of HTTP header names. Note that the header
10031029
// names are case-insensitive (see

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 79 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2418,6 +2418,8 @@ spec:
24182418
description: |-
24192419
CustomTags defines the custom tags to add to each span.
24202420
If provider is kubernetes, pod name and namespace are added by default.
2421+
2422+
Deprecated: Use Tags instead.
24212423
type: object
24222424
samplingFraction:
24232425
description: |-

0 commit comments

Comments
 (0)