Skip to content

Commit 59fb45c

Browse files
committed
Merge branch 'main' into clustertrustbundles
2 parents d0e33eb + e97b0e6 commit 59fb45c

File tree

328 files changed

+6920
-831
lines changed

Some content is hidden

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

328 files changed

+6920
-831
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.4.1
1+
v1.4.2

api/v1alpha1/connection_types.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ type ClientConnection struct {
3939

4040
// MaxAcceptPerSocketEvent provides configuration for the maximum number of connections to accept from the kernel
4141
// per socket event. If there are more than MaxAcceptPerSocketEvent connections pending accept, connections over
42-
// this threshold will be accepted in later event loop iterations. If no value is provided Envoy will accept
43-
// all connections pending accept from the kernel.
44-
// It is recommended to lower this value for better overload management and reduced per-event cost.
45-
// Setting it to 1 is a viable option with no noticeable impact on performance.
42+
// this threshold will be accepted in later event loop iterations.
43+
// Defaults to 1 and can be disabled by setting to 0 for allowing unlimited accepted connections.
4644
//
4745
// +optional
46+
// +kubebuilder:default=1
4847
MaxAcceptPerSocketEvent *uint32 `json:"maxAcceptPerSocketEvent,omitempty"`
4948
}
5049

api/v1alpha1/envoygateway_types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ type RedisTLSSettings struct {
505505
// RateLimitRedisSettings defines the configuration for connecting to redis database.
506506
type RateLimitRedisSettings struct {
507507
// URL of the Redis Database.
508+
// This can reference a single Redis host or a comma delimited list for Sentinel and Cluster deployments of Redis.
508509
URL string `json:"url"`
509510

510511
// TLS defines TLS configuration for connecting to redis database.
@@ -528,6 +529,14 @@ type ExtensionManager struct {
528529
// +optional
529530
PolicyResources []GroupVersionKind `json:"policyResources,omitempty"`
530531

532+
// BackendResources defines the set of K8s resources the extension will handle as
533+
// custom backendRef resources. These resources can be referenced in HTTPRoute
534+
// backendRefs to enable support for custom backend types (e.g., S3, Lambda, etc.)
535+
// that are not natively supported by Envoy Gateway.
536+
//
537+
// +optional
538+
BackendResources []GroupVersionKind `json:"backendResources,omitempty"`
539+
531540
// Hooks defines the set of hooks the extension supports
532541
//
533542
// +kubebuilder:validation:Required

api/v1alpha1/shared_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,15 @@ const (
387387
// XDSTranslatorHook defines the types of hooks that an Envoy Gateway extension may support
388388
// for the xds-translator
389389
//
390-
// +kubebuilder:validation:Enum=VirtualHost;Route;HTTPListener;Translation
390+
// +kubebuilder:validation:Enum=VirtualHost;Route;HTTPListener;Translation;Cluster
391391
type XDSTranslatorHook string
392392

393393
const (
394394
XDSVirtualHost XDSTranslatorHook = "VirtualHost"
395395
XDSRoute XDSTranslatorHook = "Route"
396396
XDSHTTPListener XDSTranslatorHook = "HTTPListener"
397397
XDSTranslation XDSTranslatorHook = "Translation"
398+
XDSCluster XDSTranslatorHook = "Cluster"
398399
)
399400

400401
// StringMatch defines how to match any strings.

api/v1alpha1/validation/envoygateway_validate.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package validation
88
import (
99
"fmt"
1010
"net/url"
11+
"strings"
1112

1213
egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1"
1314
)
@@ -167,8 +168,11 @@ func validateEnvoyGatewayRateLimit(rateLimit *egv1a1.RateLimit) error {
167168
if rateLimit.Backend.Redis == nil || rateLimit.Backend.Redis.URL == "" {
168169
return fmt.Errorf("empty ratelimit redis settings")
169170
}
170-
if _, err := url.Parse(rateLimit.Backend.Redis.URL); err != nil {
171-
return fmt.Errorf("unknown ratelimit redis url format: %w", err)
171+
redisHosts := strings.Split(rateLimit.Backend.Redis.URL, ",")
172+
for _, host := range redisHosts {
173+
if _, err := url.Parse(host); err != nil {
174+
return fmt.Errorf("unknown ratelimit redis url format: %w", err)
175+
}
172176
}
173177
return nil
174178
}

api/v1alpha1/validation/envoygateway_validate_test.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,42 @@ func TestValidateEnvoyGateway(t *testing.T) {
302302
},
303303
expect: true,
304304
},
305+
{
306+
name: "happy ratelimit redis sentinel settings",
307+
eg: &egv1a1.EnvoyGateway{
308+
EnvoyGatewaySpec: egv1a1.EnvoyGatewaySpec{
309+
Gateway: egv1a1.DefaultGateway(),
310+
Provider: egv1a1.DefaultEnvoyGatewayProvider(),
311+
RateLimit: &egv1a1.RateLimit{
312+
Backend: egv1a1.RateLimitDatabaseBackend{
313+
Type: egv1a1.RedisBackendType,
314+
Redis: &egv1a1.RateLimitRedisSettings{
315+
URL: "primary_.-,node-0:26379,node-1:26379",
316+
},
317+
},
318+
},
319+
},
320+
},
321+
expect: true,
322+
},
323+
{
324+
name: "happy ratelimit redis cluster settings",
325+
eg: &egv1a1.EnvoyGateway{
326+
EnvoyGatewaySpec: egv1a1.EnvoyGatewaySpec{
327+
Gateway: egv1a1.DefaultGateway(),
328+
Provider: egv1a1.DefaultEnvoyGatewayProvider(),
329+
RateLimit: &egv1a1.RateLimit{
330+
Backend: egv1a1.RateLimitDatabaseBackend{
331+
Type: egv1a1.RedisBackendType,
332+
Redis: &egv1a1.RateLimitRedisSettings{
333+
URL: "node-0:6376,node-1:6376,node-2:6376",
334+
},
335+
},
336+
},
337+
},
338+
},
339+
expect: true,
340+
},
305341
{
306342
name: "happy extension settings",
307343
eg: &egv1a1.EnvoyGateway{

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 5 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_clienttrafficpolicies.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,12 @@ spec:
154154
- value
155155
type: object
156156
maxAcceptPerSocketEvent:
157+
default: 1
157158
description: |-
158159
MaxAcceptPerSocketEvent provides configuration for the maximum number of connections to accept from the kernel
159160
per socket event. If there are more than MaxAcceptPerSocketEvent connections pending accept, connections over
160-
this threshold will be accepted in later event loop iterations. If no value is provided Envoy will accept
161-
all connections pending accept from the kernel.
162-
It is recommended to lower this value for better overload management and reduced per-event cost.
163-
Setting it to 1 is a viable option with no noticeable impact on performance.
161+
this threshold will be accepted in later event loop iterations.
162+
Defaults to 1 and can be disabled by setting to 0 for allowing unlimited accepted connections.
164163
format: int32
165164
type: integer
166165
socketBufferLimit:

charts/gateway-helm/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ To uninstall the chart:
6262
| certgen | object | `{"job":{"affinity":{},"annotations":{},"args":[],"nodeSelector":{},"resources":{},"securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532,"seccompProfile":{"type":"RuntimeDefault"}},"tolerations":[],"ttlSecondsAfterFinished":30},"rbac":{"annotations":{},"labels":{}}}` | Certgen is used to generate the certificates required by EnvoyGateway. If you want to construct a custom certificate, you can generate a custom certificate through Cert-Manager before installing EnvoyGateway. Certgen will not overwrite the custom certificate. Please do not manually modify `values.yaml` to disable certgen, it may cause EnvoyGateway OIDC,OAuth2,etc. to not work as expected. |
6363
| config.envoyGateway | object | `{"extensionApis":{},"gateway":{"controllerName":"gateway.envoyproxy.io/gatewayclass-controller"},"logging":{"level":{"default":"info"}},"provider":{"type":"Kubernetes"}}` | EnvoyGateway configuration. Visit https://gateway.envoyproxy.io/docs/api/extension_types/#envoygateway to view all options. |
6464
| createNamespace | bool | `false` | |
65+
| deployment.annotations | object | `{}` | |
6566
| deployment.envoyGateway.image.repository | string | `""` | |
6667
| deployment.envoyGateway.image.tag | string | `""` | |
6768
| deployment.envoyGateway.imagePullPolicy | string | `""` | |

charts/gateway-helm/crds/generated/gateway.envoyproxy.io_clienttrafficpolicies.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,12 @@ spec:
153153
- value
154154
type: object
155155
maxAcceptPerSocketEvent:
156+
default: 1
156157
description: |-
157158
MaxAcceptPerSocketEvent provides configuration for the maximum number of connections to accept from the kernel
158159
per socket event. If there are more than MaxAcceptPerSocketEvent connections pending accept, connections over
159-
this threshold will be accepted in later event loop iterations. If no value is provided Envoy will accept
160-
all connections pending accept from the kernel.
161-
It is recommended to lower this value for better overload management and reduced per-event cost.
162-
Setting it to 1 is a viable option with no noticeable impact on performance.
160+
this threshold will be accepted in later event loop iterations.
161+
Defaults to 1 and can be disabled by setting to 0 for allowing unlimited accepted connections.
163162
format: int32
164163
type: integer
165164
socketBufferLimit:

0 commit comments

Comments
 (0)