Skip to content

Commit 80fa485

Browse files
authored
update envoy version to v1.35.3 (#923)
1 parent af264d5 commit 80fa485

File tree

10 files changed

+415
-231
lines changed

10 files changed

+415
-231
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: lint
22

33
on:
44
push:
5-
branches: [ "main", "release/**" ]
5+
branches: [ "main", "release/**", "envoy-**" ]
66
pull_request:
77
branches: [ "main", "release/**" ]
88

@@ -127,4 +127,4 @@ jobs:
127127
run: make lint-markdown
128128

129129
- name: lint yaml
130-
run: make lint-yaml
130+
run: make lint-yaml

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: test
22

33
on:
44
push:
5-
branches: [ "main", "release/**" ]
5+
branches: [ "main", "release/**", "envoy-**" ]
66
paths-ignore:
77
- "site/**"
88
- "**/*.md"
@@ -53,13 +53,13 @@ jobs:
5353
FULL_ENVOY_VERSION=${ENVOY_API_VERSION}.0
5454
if [[ $ENVOY_API_VERSION == dev ]]; then
5555
# update this once there are more breaking changes
56-
FULL_ENVOY_VERSION=1.33.1-0.20250411033243-86ca8d764bbd
56+
FULL_ENVOY_VERSION=1.35.3
5757
# This is the envoy:contrib-dev image pull in 2025-04-11.
5858
# Use docker inspect --format='{{index .RepoDigests 0}}' envoyproxy/envoy:contrib-dev to get the sha256 ID.
5959
# We don't use the envoy:contrib-dev tag directly because it will be rewritten by the latest commit and
6060
# our test suite uses IfPresent policy to pull image.
6161
# We don't use the CI to catch the breaking change from the upstream so far.
62-
export PROXY_IMAGE=envoyproxy/envoy@sha256:2e1202c7b0bc3694a8d4a4b642888602deab77ec1bf54cb8569184112b5c0ab3
62+
export PROXY_IMAGE=envoyproxy/envoy@sha256:34c15269e0ee344fd90da7cf081124633692454ccf1be70b8078d9d2ba41a27c
6363
echo PROXY_IMAGE=$PROXY_IMAGE >> $GITHUB_ENV
6464
fi
6565
pushd ..

api/pkg/filtermanager/api/api.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,30 @@ type FilterProcessCallbacks interface {
264264

265265
type DecoderFilterCallbacks interface {
266266
FilterProcessCallbacks
267+
// Sets an upstream address override for the request. When the overridden host exists in the host list of the routed cluster
268+
// and can be selected directly, the load balancer bypasses its algorithm and routes traffic directly to the specified host.
269+
//
270+
// Here are some cases:
271+
// 1. Set a valid host(no matter in or not in the cluster), will route to the specified host directly and return 200.
272+
// 2. Set a non-IP host, C++ side will return error and not route to cluster.
273+
// 3. Set a unavailable host, and the host is not in the cluster, will req the valid host in the cluster and return 200.
274+
// 4. Set a unavailable host, and the host is in the cluster, but not available(can not connect to the host), will req the unavailable hoat and return 503.
275+
// 5. Set a unavailable host, and the host is in the cluster, but not available(can not connect to the host), and with retry. when first request with unavailable host failed 503, the second request will retry with the valid host, then the second request will succeed and finally return 200.
276+
// 6. Set a unavailable host with strict mode, and the host is in the cluster, will req the unavailable host and return 503.
277+
// 7. Set a unavailable host with strict mode, and the host is not in the cluster, will req the unavailable host and return 503.
278+
// 8. Set a unavailable host with strict mode and retry. when first request with unavailable host failed 503, the second request will retry with the valid host, then the second request will succeed and finally return 200.
279+
// 9. Set a unavailable host with strict mode and retry, and the host is not in the cluster, will req the unavailable host and return 503.
280+
//
281+
// The function takes two arguments:
282+
//
283+
// host (string): The upstream host address to use for the request. This must be a valid IP address(with port); otherwise, the
284+
// C++ side will throw an error.
285+
//
286+
// strict (boolean): Determines whether the HTTP request must be strictly routed to the requested
287+
// host. When set to ``true``, if the requested host is invalid, Envoy will return a 503 status code.
288+
// The default value is ``false``, which allows Envoy to fall back to its load balancing mechanism. In this case, if the
289+
// requested host is invalid, the request will be routed according to the load balancing algorithm and choose other hosts.
290+
SetUpstreamOverrideHost(host string, strict bool) error
267291
}
268292

269293
type EncoderFilterCallbacks interface {

api/pkg/filtermanager/api_impl_129.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package filtermanager
1818

1919
import (
20+
"fmt"
2021
"runtime/debug"
2122

2223
capi "github.com/envoyproxy/envoy/contrib/golang/common/go/api"
@@ -50,6 +51,10 @@ func (cb *filterManagerCallbackHandler) InjectData([]byte) {
5051
api.LogErrorf("InjectData is not implemented: %s", debug.Stack())
5152
}
5253

54+
func (cb *filterManagerCallbackHandler) SetUpstreamOverrideHost(host string, strict bool) error {
55+
return fmt.Errorf("SetUpstreamOverrideHost is not implemented: %s", debug.Stack())
56+
}
57+
5358
func (cb *filterManagerCallbackHandler) DecoderFilterCallbacks() api.DecoderFilterCallbacks {
5459
return cb
5560
}

api/pkg/filtermanager/api_impl_131_132.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package filtermanager
1818

1919
import (
20+
"fmt"
2021
"runtime/debug"
2122

2223
capi "github.com/envoyproxy/envoy/contrib/golang/common/go/api"
@@ -50,6 +51,10 @@ type decoderFilterCallbackHandlerWrapper struct {
5051
capi.DecoderFilterCallbacks
5152
}
5253

54+
func (cb *decoderFilterCallbackHandlerWrapper) SetUpstreamOverrideHost(host string, strict bool) error {
55+
return fmt.Errorf("SetUpstreamOverrideHost is not implemented: %s", debug.Stack())
56+
}
57+
5358
func NewDecoderFilterCallbackHandlerWrapper(h capi.DecoderFilterCallbacks) api.DecoderFilterCallbacks {
5459
return &decoderFilterCallbackHandlerWrapper{DecoderFilterCallbacks: h}
5560
}

api/plugins/tests/pkg/envoy/capi.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@ func (i *filterCallbackHandler) AddData([]byte, bool) {
572572
func (i *filterCallbackHandler) InjectData([]byte) {
573573
}
574574

575+
func (i *filterCallbackHandler) SetUpstreamOverrideHost(host string, strict bool) error {
576+
return nil
577+
}
578+
575579
func (i *filterCallbackHandler) LookupConsumer(_, _ string) (api.Consumer, bool) {
576580
return nil, false
577581
}

patch/switch-envoy-go-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if [[ "$envoy_version" =~ ^1\.32\.[0-9]+$ ]]; then
3535
exit 0
3636
fi
3737

38-
if [[ ! "$envoy_version" =~ ^1\.(29|31|32|33)\. ]]; then
38+
if [[ ! "$envoy_version" =~ ^1\.(29|31|32|33|35)\. ]]; then
3939
echo "Unsupported envoy version $envoy_version"
4040
exit 1
4141
fi

types/plugins/aicontentsecurity/config.pb.go

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

0 commit comments

Comments
 (0)