Skip to content

Commit 72c0cc7

Browse files
Xunzhuoguydcdeszhouuniglotarkodg
authored
[release/v1.0] cherry pick from main to release/v1.0 (#2911)
* ci: update cherry-pick v1.0.0 (#2784) Signed-off-by: bitliu <[email protected]> * fix: add missing release notes details and re organize it (#2785) fix: complete missing release notes and re organize it Signed-off-by: bitliu <[email protected]> * e2e: backend upgrade test (#2725) * chore: add testdata to passive health checks (#2788) * chore: add testdata to passive health checks Signed-off-by: yeedove <[email protected]> * fix test Signed-off-by: yeedove <[email protected]> --------- Signed-off-by: yeedove <[email protected]> * promote: guydc as maintainer (#2794) Signed-off-by: bitliu <[email protected]> * fix: Delete unused status keys from watchable (#2782) * Delete unused status keys in gatewayapi-runner Signed-off-by: Yuneui Jeong <[email protected]> * Delete unused status keys in xds-translator runner Signed-off-by: Yuneui Jeong <[email protected]> * Add tests and fix code to pass all tests Signed-off-by: Yuneui Jeong <[email protected]> * Cover more Signed-off-by: Yuneui <[email protected]> * Change struct's name and other minor fixes Signed-off-by: Yuneui Jeong <[email protected]> --------- Signed-off-by: Yuneui Jeong <[email protected]> Signed-off-by: Yuneui <[email protected]> * docs: fix commands in basic auth example (#2791) Signed-off-by: Arko Dasgupta <[email protected]> * feat: Support WellKnownSystemCerts in BackendTLSPolicy (#2804) * Add support for using the system truststore with upstream TLS. Signed-off-by: Lior Okman <[email protected]> * Make the linter happy Signed-off-by: Lior Okman <[email protected]> --------- Signed-off-by: Lior Okman <[email protected]> * docs: refactor user guides (#2797) * docs: refactor user guides Signed-off-by: bitliu <[email protected]> * fix: relative paths Signed-off-by: bitliu <[email protected]> --------- Signed-off-by: bitliu <[email protected]> * Fix gen check (#2814) * fix: gen-check error Signed-off-by: bitliu <[email protected]> * run lint for docs Signed-off-by: bitliu <[email protected]> --------- Signed-off-by: bitliu <[email protected]> * refactor: set instead of map for mergeGateways (#2803) * refactor:set[T] instead of map[T]bool Signed-off-by: Dennis Zhou <[email protected]> * fix lint Signed-off-by: Dennis Zhou <[email protected]> --------- Signed-off-by: Dennis Zhou <[email protected]> Co-authored-by: Xunzhuo <[email protected]> * remove: support for hostnetwork (#2815) * feat(egctl): add support for egctl to translate from gateway-api resources to IR (#2799) * Added an option to translate to IR representation. Signed-off-by: Lior Okman <[email protected]> * Added a unit test, and made sure that existing services have an IP address. Signed-off-by: Lior Okman <[email protected]> * Add omitempty where needed. Signed-off-by: Lior Okman <[email protected]> * Make gen-check happy Signed-off-by: Lior Okman <[email protected]> * Added some documentation. Signed-off-by: Lior Okman <[email protected]> --------- Signed-off-by: Lior Okman <[email protected]> * docs: basic auth example use https (#2806) * docs: basic auth example use https Signed-off-by: phantooom <[email protected]> * docs: refactor user guides (#2797) * docs: refactor user guides Signed-off-by: bitliu <[email protected]> * fix: relative paths Signed-off-by: bitliu <[email protected]> --------- Signed-off-by: bitliu <[email protected]> Signed-off-by: phantooom <[email protected]> * Fix gen check (#2814) * fix: gen-check error Signed-off-by: bitliu <[email protected]> * run lint for docs Signed-off-by: bitliu <[email protected]> --------- Signed-off-by: bitliu <[email protected]> Signed-off-by: phantooom <[email protected]> * refactor: set instead of map for mergeGateways (#2803) * refactor:set[T] instead of map[T]bool Signed-off-by: Dennis Zhou <[email protected]> * fix lint Signed-off-by: Dennis Zhou <[email protected]> --------- Signed-off-by: Dennis Zhou <[email protected]> Co-authored-by: Xunzhuo <[email protected]> Signed-off-by: phantooom <[email protected]> * Update site/content/en/latest/user/security/basic-auth.md Co-authored-by: Huabing Zhao <[email protected]> Signed-off-by: zou rui <[email protected]> --------- Signed-off-by: phantooom <[email protected]> Signed-off-by: bitliu <[email protected]> Signed-off-by: Dennis Zhou <[email protected]> Signed-off-by: zou rui <[email protected]> Co-authored-by: Xunzhuo <[email protected]> Co-authored-by: Dennis Zhou <[email protected]> Co-authored-by: Huabing Zhao <[email protected]> * chore: group go.opentelemetry.io dependabot (#2821) Signed-off-by: zirain <[email protected]> * Add referenced BackendRefs for ExtAuth to Resource Tree (#2795) * add referenced BackendRefs for ExtAuth to Resource Tree Signed-off-by: huabing zhao <[email protected]> * clean up the controller code Signed-off-by: huabing zhao <[email protected]> * minor changes Signed-off-by: huabing zhao <[email protected]> * return errors Signed-off-by: huabing zhao <[email protected]> * fix validate error Signed-off-by: huabing zhao <[email protected]> * fix gen Signed-off-by: huabing zhao <[email protected]> * Support BackendTLSPolicy for the Ext HTTP/GRPC auth service Signed-off-by: huabing zhao <[email protected]> * fix lint Signed-off-by: huabing zhao <[email protected]> * fix gen Signed-off-by: huabing zhao <[email protected]> * check cross-ns reference grant Signed-off-by: huabing zhao <[email protected]> * fix test Signed-off-by: huabing zhao <[email protected]> * fix test Signed-off-by: huabing zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]> * fix bootstrap merge (#2801) * fix bootstrap merge Signed-off-by: zirain <[email protected]> * refactor validateBootstrap Signed-off-by: zirain <[email protected]> * lint Signed-off-by: zirain <[email protected]> * update test Signed-off-by: zirain <[email protected]> --------- Signed-off-by: zirain <[email protected]> * fix: skip the ReasonTargetNotFound for all policies (#2802) * stop populating ReasonTargetNotFound for all the policies Signed-off-by: shawnh2 <[email protected]> * add test to ensure the status is expected Signed-off-by: shawnh2 <[email protected]> * fix gen-check and lint Signed-off-by: shawnh2 <[email protected]> --------- Signed-off-by: shawnh2 <[email protected]> * docs: update EnvoyProxy logs (#2822) * docs: update EnvoyProxy logs Signed-off-by: zirain <[email protected]> * lint Signed-off-by: zirain <[email protected]> --------- Signed-off-by: zirain <[email protected]> * fix: omit default replicas on Kubernetes Deployment (#2816) * fix: remove default replicas function Signed-off-by: Ardika Bagus <[email protected]> * chore: omit replicas because nil equal to 1 by default Signed-off-by: Ardika Bagus <[email protected]> * chore: add a note when a user is being explicit on deployment replicas Signed-off-by: Ardika Bagus <[email protected]> --------- Signed-off-by: Ardika Bagus <[email protected]> * bug: compute endpointType for all protocol types (#2833) Fixes: #2832 Signed-off-by: Arko Dasgupta <[email protected]> * docs: Routing outside k8s (#2831) * docs: Routing outside k8s Fixes: #2482 Signed-off-by: Arko Dasgupta <[email protected]> * updates Signed-off-by: Arko Dasgupta <[email protected]> --------- Signed-off-by: Arko Dasgupta <[email protected]> * build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#2825) Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump golang.org/x/net from 0.21.0 to 0.22.0 (#2826) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.22.0. - [Commits](golang/net@v0.21.0...v0.22.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0 (#2827) Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.8.4...v1.9.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix: failed to create envoy-oidc-hmac secret when upgrading EG (#2835) try to create every secret instead of returning eraly Signed-off-by: huabing zhao <[email protected]> * build(deps): bump google.golang.org/grpc from 1.62.0 to 1.62.1 (#2829) Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.62.0 to 1.62.1. - [Release notes](https://github.com/grpc/grpc-go/releases) - [Commits](grpc/grpc-go@v1.62.0...v1.62.1) --- updated-dependencies: - dependency-name: google.golang.org/grpc dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Ext auth e2e tests (#2830) * e2e tests for http ext auth Signed-off-by: huabing zhao <[email protected]> * export util methods to avoid unparam link issues Signed-off-by: huabing zhao <[email protected]> * fixt test Signed-off-by: Huabing Zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]> Signed-off-by: Huabing Zhao <[email protected]> * fix existing secret check (#2838) fix existing secret Signed-off-by: zirain <[email protected]> * ci: update k8s matrix (#2836) * ci: update k8s matrix Signed-off-by: zirain <[email protected]> * v1.26.14 Signed-off-by: zirain <[email protected]> * nit Signed-off-by: zirain <[email protected]> * update matrix Signed-off-by: zirain <[email protected]> * link in quickstart Signed-off-by: zirain <[email protected]> * update Signed-off-by: zirain <[email protected]> * 1.29.2 Signed-off-by: zirain <[email protected]> --------- Signed-off-by: zirain <[email protected]> * e2e: try to fix client timeout flakes (#2812) * chore: client timeout log Signed-off-by: zirain <[email protected]> * add EnvoyProxy extra args Signed-off-by: zirain <[email protected]> * add E2E_CLEANUP Signed-off-by: zirain <[email protected]> * nit Signed-off-by: zirain <[email protected]> --------- Signed-off-by: zirain <[email protected]> * feat: Support Upstream TLS to multiple Backends (#2818) * Use transport_socket_matches to setup correct sockets for different destinations. Signed-off-by: Lior Okman <[email protected]> * Support Proxy Protocol for TLS upstreams. Signed-off-by: Lior Okman <[email protected]> * Changed the name generated for each transport match to be more inline with other names used in other places in xDS. Signed-off-by: Lior Okman <[email protected]> * Added one more case in the unit-test to show that upstream proxy-protocol still works. Signed-off-by: Lior Okman <[email protected]> --------- Signed-off-by: Lior Okman <[email protected]> * e2e: move drain settings into shutdown settings (#2850) Signed-off-by: Arko Dasgupta <[email protected]> * docs: mtls to the gateway (#2851) * docs: mtls to the gateway Signed-off-by: Arko Dasgupta <[email protected]> * edits Signed-off-by: Arko Dasgupta <[email protected]> * add ref Signed-off-by: Arko Dasgupta <[email protected]> * typo Signed-off-by: Arko Dasgupta <[email protected]> --------- Signed-off-by: Arko Dasgupta <[email protected]> * ignore finalizers when comparing envoy proxy svc (#2856) * ignore finalizers when comparing envoy proxy svc Fixes: #1820 Signed-off-by: Arko Dasgupta <[email protected]> * Chore: remove the uncessary allAssociatedRefGrants from resourceMappings (#2843) * modify oidc docs Signed-off-by: huabing zhao <[email protected]> * clear allAssociatedRefGrants Signed-off-by: huabing zhao <[email protected]> * address comments Signed-off-by: huabing zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]> * docs: allow users to configure custom certs for control plane auth (#2847) Signed-off-by: zirain <[email protected]> * add e2e tests for ext auth with grpc auth service (#2841) * add e2e tests for ext auth with grpc auth service Signed-off-by: huabing zhao <[email protected]> * add BackedTLSPolicy Signed-off-by: huabing zhao <[email protected]> * generate TLS socket for ext auth services Signed-off-by: huabing zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]> * fix: Address race condition disrupting graceful shutdown process (#2864) Signed-off-by: David Alger <[email protected]> * docs: move Design docs under "Get Involved" (#2857) * docs: move Design docs under "Get Involved" * design docs are more relevant to internal contributors than external users Signed-off-by: Arko Dasgupta <[email protected]> * fix links Signed-off-by: Arko Dasgupta <[email protected]> --------- Signed-off-by: Arko Dasgupta <[email protected]> * e2e: backend TLS policy (#2853) * start backendtls test Signed-off-by: Guy Daich <[email protected]> * fix lint Signed-off-by: Guy Daich <[email protected]> * use better name for egSetup(...) Signed-off-by: Guy Daich <[email protected]> * add negative test Signed-off-by: Guy Daich <[email protected]> * use static certs for test Signed-off-by: Guy Daich <[email protected]> --------- Signed-off-by: Guy Daich <[email protected]> * Update the user doc for OIDC (#2778) * user doc for oidc Signed-off-by: huabing zhao <[email protected]> * address comments Signed-off-by: huabing zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]> * add ADOPTERS.md (#2865) ADOPTERS.md Signed-off-by: huabing zhao <[email protected]> Co-authored-by: Xunzhuo <[email protected]> * build(deps): bump softprops/action-gh-release from 1 to 2 (#2867) Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](softprops/action-gh-release@de2c0eb...d99959e) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/bufbuild/buf from 1.29.0 to 1.30.0 in /tools/src/buf (#2870) build(deps): bump github.com/bufbuild/buf in /tools/src/buf Bumps [github.com/bufbuild/buf](https://github.com/bufbuild/buf) from 1.29.0 to 1.30.0. - [Release notes](https://github.com/bufbuild/buf/releases) - [Changelog](https://github.com/bufbuild/buf/blob/main/CHANGELOG.md) - [Commits](bufbuild/buf@v1.29.0...v1.30.0) --- updated-dependencies: - dependency-name: github.com/bufbuild/buf dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump github.com/prometheus/common from 0.49.0 to 0.50.0 (#2871) Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.49.0 to 0.50.0. - [Release notes](https://github.com/prometheus/common/releases) - [Commits](prometheus/common@v0.49.0...v0.50.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * build(deps): bump fortio.org/fortio from 1.63.3 to 1.63.4 (#2873) Bumps [fortio.org/fortio](https://github.com/fortio/fortio) from 1.63.3 to 1.63.4. - [Release notes](https://github.com/fortio/fortio/releases) - [Commits](fortio/fortio@v1.63.3...v1.63.4) --- updated-dependencies: - dependency-name: fortio.org/fortio dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add tetrate to adopters (#2874) add tetrate to adopters Signed-off-by: huabing zhao <[email protected]> * fix: Don't override the ALPN array if HTTP/3 is enabled. (#2876) * Don't override the ALPN array if HTTP/3 is enabled. Signed-off-by: Lior Okman <[email protected]> * Removed the unneeded CEL validation for HTTP/3 and ALPN, as well as the CEL tests. Signed-off-by: Lior Okman <[email protected]> * Also regenerate the CRD. Signed-off-by: Lior Okman <[email protected]> --------- Signed-off-by: Lior Okman <[email protected]> * [e2e] eg release upgrade test (#2862) * [e2e] eg release upgrade test Signed-off-by: Alexander Volchok <[email protected]> * fixing linit Signed-off-by: Alexander Volchok <[email protected]> * Update test/e2e/tests/eg_upgrade.go Co-authored-by: zirain <[email protected]> Signed-off-by: Alex Volchok <[email protected]> * Update test/e2e/tests/eg_upgrade.go Co-authored-by: zirain <[email protected]> Signed-off-by: Alex Volchok <[email protected]> * adding updated go mod Signed-off-by: Alexander Volchok <[email protected]> * fix tests Signed-off-by: Alexander Volchok <[email protected]> * move eg upgrade tests to a dedicated suit Signed-off-by: Alexander Volchok <[email protected]> * removing unused Signed-off-by: Alexander Volchok <[email protected]> * fix code review feedbacks and move e2e clean after the eg upgrades suit Signed-off-by: Alexander Volchok <[email protected]> * don't clean after this step yet Signed-off-by: Alexander Volchok <[email protected]> * increase helm install / upgrade default timeouts Signed-off-by: Alexander Volchok <[email protected]> * restructure test order add an option to execute a single test Signed-off-by: Alexander Volchok <[email protected]> * fix kube make single test exec Signed-off-by: Alexander Volchok <[email protected]> * change to rc version Signed-off-by: Alexander Volchok <[email protected]> * removing loadtest part, changing to simple requests Signed-off-by: Alexander Volchok <[email protected]> --------- Signed-off-by: Alexander Volchok <[email protected]> Signed-off-by: Alex Volchok <[email protected]> Co-authored-by: zirain <[email protected]> * Docs for ext auth (#2868) * docs for ext auth Signed-off-by: huabing zhao <[email protected]> * fix lint Signed-off-by: huabing zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]> * Remove the uncessary \ (#2883) remove the \ Signed-off-by: huabing zhao <[email protected]> * docs: backend tls policy (#2884) * backend tls docs Signed-off-by: Guy Daich <[email protected]> * fix somy copy-paste mistakes Signed-off-by: Guy Daich <[email protected]> * fix typo Signed-off-by: Guy Daich <[email protected]> --------- Signed-off-by: Guy Daich <[email protected]> * feat: add PolicyStatus for BackendTrafficPolicy (#2846) * add PolicyStatus for BTP Signed-off-by: shawnh2 <[email protected]> * fix gen-check Signed-off-by: shawnh2 <[email protected]> * fix ns problem, add more test and modify controller behavior Signed-off-by: shawnh2 <[email protected]> * fix lint Signed-off-by: shawnh2 <[email protected]> * make gateway as the ancestor of btp if it is targeting to the gateway Signed-off-by: shawnh2 <[email protected]> * fix linter Signed-off-by: shawnh2 <[email protected]> * fix go.mod Signed-off-by: shawnh2 <[email protected]> * do some polish Signed-off-by: shawnh2 <[email protected]> --------- Signed-off-by: shawnh2 <[email protected]> * Change the Merge behavior to Replace for SecurityPolicy (#2885) * Change the Merge behavior to Replace for SecurityPolicy Signed-off-by: huabing zhao <[email protected]> * add another http route Signed-off-by: huabing zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]> * e2e: add weighted backend (#2863) * e2e: add backend weighted Signed-off-by: ShyunnY <[email protected]> * fix: Fix weight calculation issue and use AlmostEqual func Signed-off-by: ShyunnY <[email protected]> * fix: add additional comments Signed-off-by: ShyunnY <[email protected]> --------- Signed-off-by: ShyunnY <[email protected]> Co-authored-by: Xunzhuo <[email protected]> * http3: use service port in alt-svc header (#2886) Fixes: #2882 Signed-off-by: Arko Dasgupta <[email protected]> * bug: add h3 alpn by default if http3 is enabled (#2887) Fixes: #2875 Signed-off-by: Arko Dasgupta <[email protected]> * fix: prevent policies targeting non-TLS listeners on the same port from conflicting (#2786) * * Validate that multiple policies that affect listener configuration don't map to the same listener filter chain. * Change the XDS listener generation so that instead of defaultFilterChain for non-TLS routes, a filterChain with a destinationPort matcher is used. This allows multiple policies attached to non-TLS listeners that differ on the destination port to provide different policies without conflicting. Signed-off-by: Lior Okman <[email protected]> * Make hostname based routing work again for non-TLS listeners Signed-off-by: Lior Okman <[email protected]> * Fixed testdata for egctl Signed-off-by: Lior Okman <[email protected]> * Make the linter happy Signed-off-by: Lior Okman <[email protected]> * Added a unit-test Signed-off-by: Lior Okman <[email protected]> * Make the linter happy Signed-off-by: Lior Okman <[email protected]> * Update an e2e test with the new filterChain patch Signed-off-by: Lior Okman <[email protected]> * Revert changing the XDS translation, since a new listener is created anyways for each port. Signed-off-by: Lior Okman <[email protected]> * Also revert the xds change in the e2e test. Signed-off-by: Lior Okman <[email protected]> * Don't need to go over the full XDSIR map - just the current gateway. Signed-off-by: Lior Okman <[email protected]> * Refactored to separate the validation and the translation. Renamed the helper method to a more generic name. Signed-off-by: Lior Okman <[email protected]> --------- Signed-off-by: Lior Okman <[email protected]> Co-authored-by: Guy Daich <[email protected]> * chore: remove ProcessBackendTLSPoliciesAncestorRef (#2845) * remove ProcessBackendTLSPoliciesAncestorRef Signed-off-by: huabing zhao <[email protected]> * address comments Signed-off-by: huabing zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]> * Change the Merge behavior to Replace for BackendTrafficPolicy (#2888) * Change the Merge behavior to Replace for BackendTrafficPolicy Signed-off-by: huabing zhao <[email protected]> * address comments Signed-off-by: huabing zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]> * shutdown drainTimeout should also affect envoy drain time (#2898) Signed-off-by: Arko Dasgupta <[email protected]> * skip publishing empty status for policies (#2902) * skip publishing empty status for policies * #2802 skips computing status if a target resource cannot be found, mainly because that target maybe irrelevant to this specific translation, its hard to proactively find that out in the provider layer * This fix ensures that any empty status is not published and resets any existing status for a policy Signed-off-by: Arko Dasgupta <[email protected]> * also fix for envoypatchpolicy Signed-off-by: Arko Dasgupta <[email protected]> * also discard status for backendtlspolicy Signed-off-by: Arko Dasgupta <[email protected]> --------- Signed-off-by: Arko Dasgupta <[email protected]> * docs: multiple gatewayclass and merge gateways deployment mode (#2881) * docs: multiple gatewayclass and merge gateways deployment mode Signed-off-by: Karol Szwaj <[email protected]> * add merged-gateways example Signed-off-by: Karol Szwaj <[email protected]> * md lint Signed-off-by: Karol Szwaj <[email protected]> * yaml lint Signed-off-by: Karol Szwaj <[email protected]> * add user guides Signed-off-by: Karol Szwaj <[email protected]> --------- Signed-off-by: Karol Szwaj <[email protected]> Co-authored-by: Xunzhuo <[email protected]> * feat: add PolicyStatus for ClientTrafficPolicy (#2895) * add PolicyStatus for CTP Signed-off-by: shawnh2 <[email protected]> * fix gen-check Signed-off-by: shawnh2 <[email protected]> * revert discard policy status Signed-off-by: shawnh2 <[email protected]> --------- Signed-off-by: shawnh2 <[email protected]> * Use gwapiv1a2.PolicyStatus for SecurityPolicy Status (#2848) * use gwapiv1a2.PolicyStatus for SecurityPolicy Status Signed-off-by: huabing zhao <[email protected]> * fix lint Signed-off-by: huabing zhao <[email protected]> * add test for cross-ns refs Signed-off-by: huabing zhao <[email protected]> * add todo Signed-off-by: huabing zhao <[email protected]> * Update internal/gatewayapi/securitypolicy.go Co-authored-by: sh2 <[email protected]> Signed-off-by: Huabing Zhao <[email protected]> * address comments Signed-off-by: huabing zhao <[email protected]> --------- Signed-off-by: huabing zhao <[email protected]> Signed-off-by: Huabing Zhao <[email protected]> Co-authored-by: sh2 <[email protected]> * Fix oidc doc (#2905) fix oidc doc Signed-off-by: huabing zhao <[email protected]> * Release v1.0 (#2909) * add v1.0.0 release note Signed-off-by: bitliu <[email protected]> * generate v1.0 release page Signed-off-by: bitliu <[email protected]> * add v1.0.0 release announcement Signed-off-by: bitliu <[email protected]> * generate v1.0.0 docs Signed-off-by: bitliu <[email protected]> * update site links Signed-off-by: bitliu <[email protected]> * fix linter Signed-off-by: bitliu <[email protected]> --------- Signed-off-by: bitliu <[email protected]> --------- Signed-off-by: bitliu <[email protected]> Signed-off-by: yeedove <[email protected]> Signed-off-by: Yuneui Jeong <[email protected]> Signed-off-by: Yuneui <[email protected]> Signed-off-by: Arko Dasgupta <[email protected]> Signed-off-by: Lior Okman <[email protected]> Signed-off-by: Dennis Zhou <[email protected]> Signed-off-by: phantooom <[email protected]> Signed-off-by: zou rui <[email protected]> Signed-off-by: zirain <[email protected]> Signed-off-by: huabing zhao <[email protected]> Signed-off-by: shawnh2 <[email protected]> Signed-off-by: Ardika Bagus <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Huabing Zhao <[email protected]> Signed-off-by: David Alger <[email protected]> Signed-off-by: Guy Daich <[email protected]> Signed-off-by: Alexander Volchok <[email protected]> Signed-off-by: Alex Volchok <[email protected]> Signed-off-by: ShyunnY <[email protected]> Signed-off-by: Karol Szwaj <[email protected]> Co-authored-by: Guy Daich <[email protected]> Co-authored-by: Dennis Zhou <[email protected]> Co-authored-by: Yuneui Jeong <[email protected]> Co-authored-by: Arko Dasgupta <[email protected]> Co-authored-by: Lior Okman <[email protected]> Co-authored-by: Dennis Zhou <[email protected]> Co-authored-by: zou rui <[email protected]> Co-authored-by: Huabing Zhao <[email protected]> Co-authored-by: zirain <[email protected]> Co-authored-by: sh2 <[email protected]> Co-authored-by: Ardika <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: David Alger <[email protected]> Co-authored-by: Alex Volchok <[email protected]> Co-authored-by: Shyunn <[email protected]> Co-authored-by: Karol Szwaj <[email protected]>
1 parent b34aef9 commit 72c0cc7

File tree

446 files changed

+33966
-3200
lines changed

Some content is hidden

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

446 files changed

+33966
-3200
lines changed

.github/dependabot.yml

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ updates:
3232
k8s.io:
3333
patterns:
3434
- "k8s.io/*"
35+
go.opentelemetry.io:
36+
patterns:
37+
- "go.opentelemetry.io/*"
3538
- package-ecosystem: pip
3639
directory: /tools/src/codespell
3740
schedule:

.github/workflows/build_and_test.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ on:
1212
- "release/v*"
1313
paths-ignore:
1414
- "**/*.png"
15-
- 'site/**'
1615

1716
permissions:
1817
contents: read
@@ -81,7 +80,7 @@ jobs:
8180
needs: [build]
8281
strategy:
8382
matrix:
84-
version: [ v1.27.3, v1.28.0, v1.29.0 ]
83+
version: [ v1.26.14, v1.27.11, v1.28.7, v1.29.2 ]
8584
steps:
8685
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
8786
- uses: ./tools/github-actions/setup-deps
@@ -109,7 +108,7 @@ jobs:
109108
needs: [build]
110109
strategy:
111110
matrix:
112-
version: [ v1.27.3, v1.28.0, v1.29.0 ]
111+
version: [ v1.26.14, v1.27.11, v1.28.7, v1.29.2 ]
113112
steps:
114113
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
115114
- uses: ./tools/github-actions/setup-deps

.github/workflows/cherrypick.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
cherry_pick_release_v0_6:
12+
cherry_pick_release_v1_0:
1313
runs-on: ubuntu-22.04
14-
name: Cherry pick into release-v0.6
15-
if: ${{ contains(github.event.pull_request.labels.*.name, 'cherrypick/release-v0.6') && github.event.pull_request.merged == true }}
14+
name: Cherry pick into release-v1.0
15+
if: ${{ contains(github.event.pull_request.labels.*.name, 'cherrypick/release-v1.0') && github.event.pull_request.merged == true }}
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1919
with:
2020
fetch-depth: 0
21-
- name: Cherry pick into release/v0.6
21+
- name: Cherry pick into release/v1.0
2222
uses: carloscastrojumo/github-cherry-pick-action@a145da1b8142e752d3cbc11aaaa46a535690f0c5 # v1.0.9
2323
with:
24-
branch: release/v0.6
25-
title: "[release/v0.6] {old_title}"
26-
body: "Cherry picking #{old_pull_request_id} onto release/v0.6"
24+
branch: release/v1.0
25+
title: "[release/v1.0] {old_title}"
26+
body: "Cherry picking #{old_pull_request_id} onto release/v1.0"
2727
labels: |
28-
cherrypick/release-v0.6
28+
cherrypick/release-v1.0
2929
# put release manager here
3030
reviewers: |
31-
arkodg
31+
Xunzhuo

.github/workflows/experimental_conformance.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-latest
1919
strategy:
2020
matrix:
21-
version: [ v1.26.6, v1.27.3, v1.28.0 ]
21+
version: [ v1.26.14, v1.27.11, v1.28.7, v1.29.2 ]
2222
steps:
2323
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2424
- uses: ./tools/github-actions/setup-deps

.github/workflows/latest_release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
GITHUB_REPOSITORY: ${{ github.repository_owner }}/${{ github.event.repository.name }}
6262

6363
- name: Recreate the Latest Release and Tag
64-
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
64+
uses: softprops/action-gh-release@d99959edae48b5ffffd7b00da66dcdb0a33a52ee # v0.1.15
6565
with:
6666
draft: false
6767
prerelease: true

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: OCI_REGISTRY=oci://docker.io/envoyproxy CHART_VERSION=${{ env.release_tag }} IMAGE=docker.io/envoyproxy/gateway TAG=${{ env.release_tag }} make helm-package helm-push
4141

4242
- name: Upload Release Manifests
43-
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
43+
uses: softprops/action-gh-release@d99959edae48b5ffffd7b00da66dcdb0a33a52ee # v0.1.15
4444
with:
4545
files: |
4646
release-artifacts/install.yaml

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ vendor/
3131

3232
# values.yaml file is generated from its template counterpart.
3333
charts/gateway-helm/values.yaml
34+
35+
# VIM
36+
.*.swp

ADOPTERS.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
<!--
3+
4+
Insert your entry using this template keeping the list alphabetically sorted:
5+
6+
## <Company/Organization Name>
7+
* Website: https://www.your-website.com
8+
* Category: End User, Service Provider, etc
9+
* Environments: AWS, Azure, Google Cloud, Bare Metal, etc
10+
* Use Cases:
11+
- ...
12+
* Status:
13+
- [ ] development & testing
14+
- [ ] production
15+
* (Option) Logo (show in the official site):
16+
* (Option) Description:
17+
-->
18+
19+
# Envoy Gateway Adopters
20+
21+
This page contains a list of organizations who are users of Envoy Gateway, following the [definitions provided by the CNCF](https://github.com/cncf/toc/blob/main/FAQ.md#what-is-the-definition-of-an-adopter).
22+
23+
If you would like to be included in this table, please submit a PR to this file or comment to [this issue](https://github.com/envoyproxy/gateway/issues/2781) and your information will be added.
24+
25+
## AllFactors
26+
* Website https://allfactors.com
27+
* Category: End User
28+
* Environments:
29+
* Use Case:
30+
- Routing all customer traffic to our various backends. Every time a new customer signs up we dynamically add a
31+
route to a new hostname so Envoy Gateway is deeply integrated with our product.
32+
* Status: production
33+
* Logo: https://allfactors.com/AllFactors-Logo.svg
34+
35+
## Tetrate
36+
* Website: https://www.tetrate.io
37+
* Category: Service Provider
38+
* Environments: AWS
39+
* Use Cases:
40+
- Tetrate provides Enterprise Gateway (TEG) to end users, which includes a 100% upstream distribution of Envoy Gateway, and management to deliver applications securely, authenticate user traffic, protect services with rate limiting and WAF, and integrate with your observability stack to monitor and observe activity.
41+
* Status: production
42+
* (Option) https://tetrate.io/wp-content/uploads/2023/03/tetrate-logo-dark.svg
43+
* (Option) Description:

OWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ maintainers:
1515
- zirain
1616
- qicz
1717
- zhaohuabing
18+
- guydc
1819

1920
reviewers:
2021

@@ -25,5 +26,4 @@ reviewers:
2526
- tanujd11
2627
- cnvergence
2728
- shawnh2
28-
- guydc
2929
- liorokman

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.0.0-rc.1
1+
v1.0.0

api/v1alpha1/backendtrafficpolicy_types.go

+1-12
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type BackendTrafficPolicy struct {
3131
Spec BackendTrafficPolicySpec `json:"spec"`
3232

3333
// status defines the current status of BackendTrafficPolicy.
34-
Status BackendTrafficPolicyStatus `json:"status,omitempty"`
34+
Status gwapiv1a2.PolicyStatus `json:"status,omitempty"`
3535
}
3636

3737
// spec defines the desired state of BackendTrafficPolicy.
@@ -98,17 +98,6 @@ type BackendTrafficPolicySpec struct {
9898
Compression []*Compression `json:"compression,omitempty"`
9999
}
100100

101-
// BackendTrafficPolicyStatus defines the state of BackendTrafficPolicy
102-
type BackendTrafficPolicyStatus struct {
103-
// Conditions describe the current conditions of the BackendTrafficPolicy.
104-
//
105-
// +optional
106-
// +listType=map
107-
// +listMapKey=type
108-
// +kubebuilder:validation:MaxItems=8
109-
Conditions []metav1.Condition `json:"conditions,omitempty"`
110-
}
111-
112101
// +kubebuilder:object:root=true
113102
// BackendTrafficPolicyList contains a list of BackendTrafficPolicy resources.
114103
type BackendTrafficPolicyList struct {

api/v1alpha1/clienttrafficpolicy_types.go

+1-13
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ type ClientTrafficPolicy struct {
3131
Spec ClientTrafficPolicySpec `json:"spec"`
3232

3333
// Status defines the current status of ClientTrafficPolicy.
34-
Status ClientTrafficPolicyStatus `json:"status,omitempty"`
34+
Status gwapiv1a2.PolicyStatus `json:"status,omitempty"`
3535
}
3636

37-
// +kubebuilder:validation:XValidation:rule="has(self.http3) && has(self.tls) && has(self.tls.alpnProtocols) ? self.tls.alpnProtocols.size() == 0 : true",message="alpn protocols can't be set if HTTP/3 is enabled"
3837
// ClientTrafficPolicySpec defines the desired state of ClientTrafficPolicy.
3938
type ClientTrafficPolicySpec struct {
4039
// +kubebuilder:validation:XValidation:rule="self.group == 'gateway.networking.k8s.io'", message="this policy can only have a targetRef.group of gateway.networking.k8s.io"
@@ -175,17 +174,6 @@ type HTTP10Settings struct {
175174
UseDefaultHost *bool `json:"useDefaultHost,omitempty"`
176175
}
177176

178-
// ClientTrafficPolicyStatus defines the state of ClientTrafficPolicy
179-
type ClientTrafficPolicyStatus struct {
180-
// Conditions describe the current conditions of the ClientTrafficPolicy.
181-
//
182-
// +optional
183-
// +listType=map
184-
// +listMapKey=type
185-
// +kubebuilder:validation:MaxItems=8
186-
Conditions []metav1.Condition `json:"conditions,omitempty"`
187-
}
188-
189177
const (
190178
// PolicyConditionOverridden indicates whether the policy has
191179
// completely attached to all the sections within the target or not.

api/v1alpha1/kubernetes_helpers.go

+1-11
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ import (
1717
"k8s.io/utils/ptr"
1818
)
1919

20-
// DefaultKubernetesDeploymentReplicas returns the default replica settings.
21-
func DefaultKubernetesDeploymentReplicas() *int32 {
22-
repl := int32(DefaultDeploymentReplicas)
23-
return &repl
24-
}
25-
2620
// DefaultKubernetesDeploymentStrategy returns the default deployment strategy settings.
2721
func DefaultKubernetesDeploymentStrategy() *appv1.DeploymentStrategy {
2822
return &appv1.DeploymentStrategy{
@@ -38,7 +32,6 @@ func DefaultKubernetesContainerImage(image string) *string {
3832
// DefaultKubernetesDeployment returns a new KubernetesDeploymentSpec with default settings.
3933
func DefaultKubernetesDeployment(image string) *KubernetesDeploymentSpec {
4034
return &KubernetesDeploymentSpec{
41-
Replicas: DefaultKubernetesDeploymentReplicas(),
4235
Strategy: DefaultKubernetesDeploymentStrategy(),
4336
Pod: DefaultKubernetesPod(),
4437
Container: DefaultKubernetesContainer(image),
@@ -96,10 +89,6 @@ func GetKubernetesServiceExternalTrafficPolicy(serviceExternalTrafficPolicy Serv
9689

9790
// defaultKubernetesDeploymentSpec fill a default KubernetesDeploymentSpec if unspecified.
9891
func (deployment *KubernetesDeploymentSpec) defaultKubernetesDeploymentSpec(image string) {
99-
if deployment.Replicas == nil {
100-
deployment.Replicas = DefaultKubernetesDeploymentReplicas()
101-
}
102-
10392
if deployment.Strategy == nil {
10493
deployment.Strategy = DefaultKubernetesDeploymentStrategy()
10594
}
@@ -121,6 +110,7 @@ func (deployment *KubernetesDeploymentSpec) defaultKubernetesDeploymentSpec(imag
121110
}
122111
}
123112

113+
// setDefault fill a default HorizontalPodAutoscalerSpec if unspecified
124114
func (hpa *KubernetesHorizontalPodAutoscalerSpec) setDefault() {
125115
if len(hpa.Metrics) == 0 {
126116
hpa.Metrics = DefaultEnvoyProxyHpaMetrics()

api/v1alpha1/securitypolicy_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type SecurityPolicy struct {
3131
Spec SecurityPolicySpec `json:"spec"`
3232

3333
// Status defines the current status of SecurityPolicy.
34-
Status SecurityPolicyStatus `json:"status,omitempty"`
34+
Status gwapiv1a2.PolicyStatus `json:"status,omitempty"`
3535
}
3636

3737
// SecurityPolicySpec defines the desired state of SecurityPolicy.

api/v1alpha1/shared_types.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ type KubernetesPodSpec struct {
126126
// +optional
127127
Volumes []corev1.Volume `json:"volumes,omitempty"`
128128

129-
// HostNetwork, If this is set to true, the pod will use host's network namespace.
130-
// +optional
131-
HostNetwork bool `json:"hostNetwork,omitempty"`
132-
133129
// ImagePullSecrets is an optional list of references to secrets
134130
// in the same namespace to use for pulling any of the images used by this PodSpec.
135131
// If specified, these secrets will be passed to individual puller implementations for them to use.
@@ -348,6 +344,8 @@ const (
348344
)
349345

350346
// KubernetesHorizontalPodAutoscalerSpec defines Kubernetes Horizontal Pod Autoscaler settings of Envoy Proxy Deployment.
347+
// When HPA is enabled, it is recommended that the value in `KubernetesDeploymentSpec.replicas` be removed, otherwise
348+
// Envoy Gateway will revert back to this value every time reconciliation occurs.
351349
// See k8s.io.autoscaling.v2.HorizontalPodAutoScalerSpec.
352350
//
353351
// +kubebuilder:validation:XValidation:message="maxReplicas cannot be less than minReplicas",rule="!has(self.minReplicas) || self.maxReplicas >= self.minReplicas"

api/v1alpha1/validation/envoygateway_validate_test.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,7 @@ func TestEnvoyGatewayProvider(t *testing.T) {
668668

669669
envoyGatewayProvider.Kubernetes = &v1alpha1.EnvoyGatewayKubernetesProvider{
670670
RateLimitDeployment: &v1alpha1.KubernetesDeploymentSpec{
671-
Replicas: nil,
672-
Pod: nil,
671+
Pod: nil,
673672
Container: &v1alpha1.KubernetesContainerSpec{
674673
Resources: nil,
675674
SecurityContext: nil,
@@ -684,8 +683,6 @@ func TestEnvoyGatewayProvider(t *testing.T) {
684683

685684
assert.NotNil(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment)
686685
assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment, v1alpha1.DefaultKubernetesDeployment(v1alpha1.DefaultRateLimitImage))
687-
assert.NotNil(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Replicas)
688-
assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Replicas, v1alpha1.DefaultKubernetesDeploymentReplicas())
689686
assert.NotNil(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Pod)
690687
assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Pod, v1alpha1.DefaultKubernetesPod())
691688
assert.NotNil(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container)

api/v1alpha1/validation/envoyproxy_validate.go

+13-25
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ import (
99
"errors"
1010
"fmt"
1111
"net/netip"
12-
"reflect"
1312

1413
bootstrapv3 "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v3"
1514
clusterv3 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3"
1615
"github.com/google/go-cmp/cmp"
17-
"google.golang.org/protobuf/encoding/protojson"
1816
"google.golang.org/protobuf/testing/protocmp"
1917
utilerrors "k8s.io/apimachinery/pkg/util/errors"
20-
"sigs.k8s.io/yaml"
2118

2219
egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1"
20+
"github.com/envoyproxy/gateway/internal/utils/proto"
2321
"github.com/envoyproxy/gateway/internal/xds/bootstrap"
2422
_ "github.com/envoyproxy/gateway/internal/xds/extensions" // register the generated types to support protojson unmarshalling
2523
)
@@ -140,42 +138,33 @@ func validateService(spec *egv1a1.EnvoyProxySpec) []error {
140138
}
141139

142140
func validateBootstrap(boostrapConfig *egv1a1.ProxyBootstrap) error {
141+
// Validate user bootstrap config
143142
defaultBootstrap := &bootstrapv3.Bootstrap{}
144143
// TODO: need validate when enable prometheus?
145144
defaultBootstrapStr, err := bootstrap.GetRenderedBootstrapConfig(nil)
146145
if err != nil {
147146
return err
148147
}
148+
if err := proto.FromYAML([]byte(defaultBootstrapStr), defaultBootstrap); err != nil {
149+
return fmt.Errorf("unable to unmarshal default bootstrap: %w", err)
150+
}
151+
if err := defaultBootstrap.Validate(); err != nil {
152+
return fmt.Errorf("default bootstrap validation failed: %w", err)
153+
}
149154

155+
// Validate user bootstrap config
150156
userBootstrapStr, err := bootstrap.ApplyBootstrapConfig(boostrapConfig, defaultBootstrapStr)
151157
if err != nil {
152158
return err
153159
}
154-
155-
jsonData, err := yaml.YAMLToJSON([]byte(userBootstrapStr))
156-
if err != nil {
157-
return fmt.Errorf("unable to convert user bootstrap to json: %w", err)
158-
}
159-
160160
userBootstrap := &bootstrapv3.Bootstrap{}
161-
if err := protojson.Unmarshal(jsonData, userBootstrap); err != nil {
162-
return fmt.Errorf("unable to unmarshal user bootstrap: %w", err)
161+
if err := proto.FromYAML([]byte(userBootstrapStr), userBootstrap); err != nil {
162+
return fmt.Errorf("failed to parse default bootstrap config: %w", err)
163163
}
164-
165-
// Call Validate method
166164
if err := userBootstrap.Validate(); err != nil {
167165
return fmt.Errorf("validation failed for user bootstrap: %w", err)
168166
}
169167

170-
jsonData, err = yaml.YAMLToJSON([]byte(defaultBootstrapStr))
171-
if err != nil {
172-
return fmt.Errorf("unable to convert default bootstrap to json: %w", err)
173-
}
174-
175-
if err := protojson.Unmarshal(jsonData, defaultBootstrap); err != nil {
176-
return fmt.Errorf("unable to unmarshal default bootstrap: %w", err)
177-
}
178-
179168
// Ensure dynamic resources config is same
180169
if userBootstrap.DynamicResources == nil ||
181170
cmp.Diff(userBootstrap.DynamicResources, defaultBootstrap.DynamicResources, protocmp.Transform()) != "" {
@@ -196,9 +185,8 @@ func validateBootstrap(boostrapConfig *egv1a1.ProxyBootstrap) error {
196185
break
197186
}
198187
}
199-
200-
// nolint // Circumvents this error "Error: copylocks: call of reflect.DeepEqual copies lock value:"
201-
if userXdsCluster == nil || !reflect.DeepEqual(*userXdsCluster.LoadAssignment, *defaultXdsCluster.LoadAssignment) {
188+
if userXdsCluster == nil ||
189+
cmp.Diff(userXdsCluster.LoadAssignment, defaultXdsCluster.LoadAssignment, protocmp.Transform()) != "" {
202190
return fmt.Errorf("xds_cluster's loadAssigntment cannot be modified")
203191
}
204192

0 commit comments

Comments
 (0)