Skip to content

Commit 232bdc1

Browse files
authored
Merge branch 'main' into grpc-streaming-timeout
Signed-off-by: Isaac <[email protected]>
2 parents 31097da + 77148c9 commit 232bdc1

36 files changed

+2854
-25
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
run: make build-multiarch PLATFORMS="linux_amd64 linux_arm64"
118118

119119
- name: Upload EG Binaries
120-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
120+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
121121
with:
122122
name: envoy-gateway
123123
path: bin/
@@ -156,7 +156,7 @@ jobs:
156156
- uses: ./tools/github-actions/setup-deps
157157

158158
- name: Download EG Binaries
159-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
159+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
160160
with:
161161
name: envoy-gateway
162162
path: bin/
@@ -210,7 +210,7 @@ jobs:
210210
- uses: ./tools/github-actions/setup-deps
211211

212212
- name: Download EG Binaries
213-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
213+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
214214
with:
215215
name: envoy-gateway
216216
path: bin/
@@ -265,7 +265,7 @@ jobs:
265265
run: make benchmark
266266

267267
- name: Upload Benchmark report
268-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
268+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
269269
with:
270270
name: benchmark-report
271271
path: ./test/benchmark/benchmark_report/
@@ -293,7 +293,7 @@ jobs:
293293
- uses: ./tools/github-actions/setup-deps
294294

295295
- name: Download EG Binaries
296-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
296+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
297297
with:
298298
name: envoy-gateway
299299
path: bin/

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ jobs:
3636
- uses: ./tools/github-actions/setup-deps
3737

3838
- name: Initialize CodeQL
39-
uses: github/codeql-action/init@16140ae1a102900babc80a33c44059580f687047 # v3.29.5
39+
uses: github/codeql-action/init@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
4040
with:
4141
languages: ${{ matrix.language }}
4242

4343
- name: Autobuild
44-
uses: github/codeql-action/autobuild@16140ae1a102900babc80a33c44059580f687047 # v3.29.5
44+
uses: github/codeql-action/autobuild@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
4545

4646
- name: Perform CodeQL Analysis
47-
uses: github/codeql-action/analyze@16140ae1a102900babc80a33c44059580f687047 # v3.29.5
47+
uses: github/codeql-action/analyze@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
4848
with:
4949
category: "/language:${{matrix.language}}"

.github/workflows/experimental_conformance.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
run: make experimental-conformance
6161

6262
- name: Upload Conformance Report
63-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
63+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6464
with:
6565
name: conformance-report-k8s-${{ matrix.target.version }}-${{ matrix.target.profile }}
6666
path: ./test/conformance/conformance-report-k8s-${{ matrix.target.version }}-${{ matrix.target.profile }}.yaml

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: cd test/benchmark && zip -r benchmark_report.zip benchmark_report
4343

4444
- name: Upload Benchmark Report
45-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
45+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
4646
with:
4747
name: benchmark_report
4848
path: test/benchmark/benchmark_report.zip
@@ -81,7 +81,7 @@ jobs:
8181
IMAGE_PULL_POLICY=IfNotPresent OCI_REGISTRY=oci://docker.io/envoyproxy CHART_VERSION=${{ env.without_v_release_tag }} IMAGE=docker.io/envoyproxy/gateway TAG=${{ env.release_tag }} make helm-package helm-push
8282
8383
- name: Download Benchmark Report
84-
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
84+
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
8585
with:
8686
name: benchmark_report
8787
path: release-artifacts

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
publish_results: true
3434

3535
- name: "Upload artifact"
36-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
36+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
3737
with:
3838
name: SARIF file
3939
path: results.sarif
4040
retention-days: 5
4141

4242
- name: "Upload to code-scanning"
43-
uses: github/codeql-action/upload-sarif@16140ae1a102900babc80a33c44059580f687047 # v3.29.5
43+
uses: github/codeql-action/upload-sarif@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
4444
with:
4545
sarif_file: results.sarif

api/v1alpha1/connection_types.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,45 @@ type BackendConnection struct {
7070
// +optional
7171
// +notImplementedHide
7272
SocketBufferLimit *resource.Quantity `json:"socketBufferLimit,omitempty"`
73+
74+
// Preconnect configures proactive upstream connections to reduce latency by establishing
75+
// connections before they’re needed and avoiding connection establishment overhead.
76+
//
77+
// If unset, Envoy will fetch connections as needed to serve in-flight requests.
78+
//
79+
// +optional
80+
Preconnect *PreconnectPolicy `json:"preconnect,omitempty"`
81+
}
82+
83+
// Preconnect configures proactive upstream connections to avoid
84+
// connection establishment overhead and reduce latency.
85+
type PreconnectPolicy struct {
86+
// PerEndpointPercent configures how many additional connections to maintain per
87+
// upstream endpoint, useful for high-QPS or latency sensitive services. Expressed as a
88+
// percentage of the connections required by active streams
89+
// (e.g. 100 = preconnect disabled, 105 = 1.05x connections per-endpoint, 200 = 2.00×).
90+
//
91+
// Allowed value range is between 100-300. When both PerEndpointPercent and
92+
// PredictivePercent are set, Envoy ensures both are satisfied (max of the two).
93+
//
94+
// +kubebuilder:validation:Minimum=100
95+
// +kubebuilder:validation:Maximum=300
96+
// +optional
97+
PerEndpointPercent *uint32 `json:"perEndpointPercent,omitempty"`
98+
99+
// PredictivePercent configures how many additional connections to maintain
100+
// across the cluster by anticipating which upstream endpoint the load balancer
101+
// will select next, useful for low-QPS services. Relies on deterministic
102+
// loadbalancing and is only supported with Random or RoundRobin.
103+
// Expressed as a percentage of the connections required by active streams
104+
// (e.g. 100 = 1.0 (no preconnect), 105 = 1.05× connections across the cluster, 200 = 2.00×).
105+
//
106+
// Minimum allowed value is 100. When both PerEndpointPercent and PredictivePercent are
107+
// set Envoy ensures both are satisfied per host (max of the two).
108+
//
109+
// +kubebuilder:validation:Minimum=100
110+
// +optional
111+
PredictivePercent *uint32 `json:"predictivePercent,omitempty"`
73112
}
74113

75114
type ConnectionLimit struct {

api/v1alpha1/shared_types.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,8 @@ type BackendCluster struct {
585585

586586
// ClusterSettings provides the various knobs that can be set to control how traffic to a given
587587
// backend will be configured.
588+
//
589+
// +kubebuilder:validation:XValidation:rule="!((has(self.connection) && has(self.connection.preconnect) && has(self.connection.preconnect.predictivePercent)) && !(has(self.loadBalancer) && has(self.loadBalancer.type) && self.loadBalancer.type in ['Random', 'RoundRobin']))",message="predictivePercent in preconnect policy only works with RoundRobin or Random load balancers"
588590
type ClusterSettings struct {
589591
// LoadBalancer policy to apply when routing traffic from the gateway to
590592
// the backend endpoints. Defaults to `LeastRequest`.

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 30 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: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,41 @@ spec:
191191
For example, 20Mi, 1Gi, 256Ki etc.
192192
Note: that when the suffix is not provided, the value is interpreted as bytes.
193193
x-kubernetes-int-or-string: true
194+
preconnect:
195+
description: |-
196+
Preconnect configures proactive upstream connections to reduce latency by establishing
197+
connections before they’re needed and avoiding connection establishment overhead.
198+
199+
If unset, Envoy will fetch connections as needed to serve in-flight requests.
200+
properties:
201+
perEndpointPercent:
202+
description: |-
203+
PerEndpointPercent configures how many additional connections to maintain per
204+
upstream endpoint, useful for high-QPS or latency sensitive services. Expressed as a
205+
percentage of the connections required by active streams
206+
(e.g. 100 = preconnect disabled, 105 = 1.05x connections per-endpoint, 200 = 2.00×).
207+
208+
Allowed value range is between 100-300. When both PerEndpointPercent and
209+
PredictivePercent are set, Envoy ensures both are satisfied (max of the two).
210+
format: int32
211+
maximum: 300
212+
minimum: 100
213+
type: integer
214+
predictivePercent:
215+
description: |-
216+
PredictivePercent configures how many additional connections to maintain
217+
across the cluster by anticipating which upstream endpoint the load balancer
218+
will select next, useful for low-QPS services. Relies on deterministic
219+
loadbalancing and is only supported with Random or RoundRobin.
220+
Expressed as a percentage of the connections required by active streams
221+
(e.g. 100 = 1.0 (no preconnect), 105 = 1.05× connections across the cluster, 200 = 2.00×).
222+
223+
Minimum allowed value is 100. When both PerEndpointPercent and PredictivePercent are
224+
set Envoy ensures both are satisfied per host (max of the two).
225+
format: int32
226+
minimum: 100
227+
type: integer
228+
type: object
194229
socketBufferLimit:
195230
allOf:
196231
- pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
@@ -2273,6 +2308,12 @@ spec:
22732308
: true'
22742309
- message: either compression or compressor can be set, not both
22752310
rule: '!has(self.compression) || !has(self.compressor)'
2311+
- message: predictivePercent in preconnect policy only works with RoundRobin
2312+
or Random load balancers
2313+
rule: '!((has(self.connection) && has(self.connection.preconnect) &&
2314+
has(self.connection.preconnect.predictivePercent)) && !(has(self.loadBalancer)
2315+
&& has(self.loadBalancer.type) && self.loadBalancer.type in [''Random'',
2316+
''RoundRobin'']))'
22762317
status:
22772318
description: status defines the current status of BackendTrafficPolicy.
22782319
properties:

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,41 @@ spec:
302302
For example, 20Mi, 1Gi, 256Ki etc.
303303
Note: that when the suffix is not provided, the value is interpreted as bytes.
304304
x-kubernetes-int-or-string: true
305+
preconnect:
306+
description: |-
307+
Preconnect configures proactive upstream connections to reduce latency by establishing
308+
connections before they’re needed and avoiding connection establishment overhead.
309+
310+
If unset, Envoy will fetch connections as needed to serve in-flight requests.
311+
properties:
312+
perEndpointPercent:
313+
description: |-
314+
PerEndpointPercent configures how many additional connections to maintain per
315+
upstream endpoint, useful for high-QPS or latency sensitive services. Expressed as a
316+
percentage of the connections required by active streams
317+
(e.g. 100 = preconnect disabled, 105 = 1.05x connections per-endpoint, 200 = 2.00×).
318+
319+
Allowed value range is between 100-300. When both PerEndpointPercent and
320+
PredictivePercent are set, Envoy ensures both are satisfied (max of the two).
321+
format: int32
322+
maximum: 300
323+
minimum: 100
324+
type: integer
325+
predictivePercent:
326+
description: |-
327+
PredictivePercent configures how many additional connections to maintain
328+
across the cluster by anticipating which upstream endpoint the load balancer
329+
will select next, useful for low-QPS services. Relies on deterministic
330+
loadbalancing and is only supported with Random or RoundRobin.
331+
Expressed as a percentage of the connections required by active streams
332+
(e.g. 100 = 1.0 (no preconnect), 105 = 1.05× connections across the cluster, 200 = 2.00×).
333+
334+
Minimum allowed value is 100. When both PerEndpointPercent and PredictivePercent are
335+
set Envoy ensures both are satisfied per host (max of the two).
336+
format: int32
337+
minimum: 100
338+
type: integer
339+
type: object
305340
socketBufferLimit:
306341
allOf:
307342
- pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
@@ -1067,6 +1102,13 @@ spec:
10671102
type: object
10681103
type: object
10691104
type: object
1105+
x-kubernetes-validations:
1106+
- message: predictivePercent in preconnect policy only works
1107+
with RoundRobin or Random load balancers
1108+
rule: '!((has(self.connection) && has(self.connection.preconnect)
1109+
&& has(self.connection.preconnect.predictivePercent)) &&
1110+
!(has(self.loadBalancer) && has(self.loadBalancer.type)
1111+
&& self.loadBalancer.type in [''Random'', ''RoundRobin'']))'
10701112
failOpen:
10711113
default: false
10721114
description: |-

0 commit comments

Comments
 (0)