Skip to content

Commit

Permalink
upgrade to istio 1.18
Browse files Browse the repository at this point in the history
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
  • Loading branch information
zhaohuabing committed Aug 12, 2023
1 parent 57327a0 commit b16b7cf
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 159 deletions.
14 changes: 6 additions & 8 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,21 @@ envoy_cc_binary(
"//src/application_protocols/dubbo:config",
"//src/application_protocols/thrift:config",
"//src/application_protocols/brpc:config",
"@io_istio_proxy//extensions/access_log_policy:access_log_policy_lib",
"@io_istio_proxy//extensions/attributegen:attributegen_plugin",
"@io_istio_proxy//extensions/access_log_policy:access_log_policy_lib",
"@io_istio_proxy//extensions/metadata_exchange:metadata_exchange_lib",
"@io_istio_proxy//extensions/stackdriver:stackdriver_plugin",
"@io_istio_proxy//extensions/stats:stats_plugin",
"@io_istio_proxy//source/extensions/common/workload_discovery:api_lib", # Experimental: WIP
"@io_istio_proxy//source/extensions/filters/http/alpn:config_lib",
"@io_istio_proxy//source/extensions/filters/http/authn:filter_lib",
"@io_istio_proxy//source/extensions/filters/http/connect_authority", # Experimental: ambient
"@io_istio_proxy//source/extensions/filters/http/connect_baggage", # Experimental: ambient
"@io_istio_proxy//source/extensions/filters/http/istio_stats",
"@io_istio_proxy//source/extensions/filters/listener/set_internal_dst_address:filter_lib", # Experimental: ambient
"@io_istio_proxy//source/extensions/filters/network/forward_downstream_sni:config_lib",
"@io_istio_proxy//source/extensions/filters/network/istio_authn:config_lib",
"@io_istio_proxy//source/extensions/filters/network/metadata_exchange:config_lib",
"@io_istio_proxy//source/extensions/filters/network/sni_verifier:config_lib",
"@io_istio_proxy//source/extensions/filters/network/tcp_cluster_rewrite:config_lib",
"@io_istio_proxy//src/envoy/http/baggage_handler:config_lib", # Experimental: Ambient
"@io_istio_proxy//src/envoy/metadata_to_peer_node:config_lib", # Experimental: Ambient
"@io_istio_proxy//src/envoy/set_internal_dst_address:filter_lib", # Experimental: Ambient
"@io_istio_proxy//src/envoy/tls_passthrough:filter_lib", # Experimental: Ambient
"@io_istio_proxy//src/envoy/workload_metadata:config_lib", # Experimental: Ambient
"@envoy//source/exe:envoy_main_entry_lib",
],
)
16 changes: 6 additions & 10 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,17 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "io_istio_proxy",
strip_prefix = "proxy-1.16.5",
sha256 = "9bef0f346d0b1c8bcca3df0b4a4ccd5f8ac3e3ba418f5045d78bdc8ba69c1080",
url = "https://github.com/istio/proxy/archive/refs/tags/1.16.5.tar.gz",
strip_prefix = "proxy-1.18.2",
sha256 = "469cd2079402d5a696badae9392b923ad7911bd7c00644a6529dbd5a6b976f7c",
url = "https://github.com/istio/proxy/archive/refs/tags/1.18.2.tar.gz",
)

load(
"@io_istio_proxy//bazel:repositories.bzl",
"docker_dependencies",
"googletest_repositories",
"istioapi_dependencies",
)

googletest_repositories()

istioapi_dependencies()

bind(
Expand All @@ -45,11 +42,10 @@ bind(
# 1. Determine SHA256 `wget https://github.com/envoyproxy/envoy/archive/$COMMIT.tar.gz && sha256sum $COMMIT.tar.gz`
# 2. Update .bazelversion, envoy.bazelrc and .bazelrc if needed.
#
# Note: this is needed by release builder to resolve envoy dep sha to tag.
# Commit date: 2023-05-18
ENVOY_SHA = "c84fa029500b6f06b3dfde6c3ea492218a7c781d"
# Commit date: 2023-07-26
ENVOY_SHA = "dbbe864852395ee5640b110bb25bff8e17b0c6da"

ENVOY_SHA256 = "afaaa63de402e3aed76982c05094f88042be5822d5d5e0034b0e9c88b4d9b2fa"
ENVOY_SHA256 = "34824f935f9fe936bdb04dbb199ff4e3d983b3e58abbe4b03e585520aa899eab"

ENVOY_ORG = "envoyproxy"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,3 @@ fi
echo "BUILD_SCM_REVISION ${BUILD_SCM_REVISION}"
echo "BUILD_SCM_STATUS ${BUILD_SCM_STATUS}"
echo "BUILD_CONFIG ${BUILD_CONFIG:-default}"
echo "DOCKER_REPOSITORY ${DOCKER_REPOSITORY:-istio-testing/envoy}"
echo "WASM_REPOSITORY ${WASM_REPOSITORY:-istio-testing/wasm}"
91 changes: 81 additions & 10 deletions bazel/extension_config/extensions_build_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ ENVOY_EXTENSIONS = {
"envoy.access_loggers.http_grpc": "//source/extensions/access_loggers/grpc:http_config",
"envoy.access_loggers.tcp_grpc": "//source/extensions/access_loggers/grpc:tcp_config",
"envoy.access_loggers.open_telemetry": "//source/extensions/access_loggers/open_telemetry:config",
"envoy.access_loggers.stream": "//source/extensions/access_loggers/stream:config",
"envoy.access_loggers.stdout": "//source/extensions/access_loggers/stream:config",
"envoy.access_loggers.stderr": "//source/extensions/access_loggers/stream:config",
"envoy.access_loggers.wasm": "//source/extensions/access_loggers/wasm:config",

#
Expand All @@ -19,7 +20,12 @@ ENVOY_EXTENSIONS = {

"envoy.clusters.aggregate": "//source/extensions/clusters/aggregate:cluster",
"envoy.clusters.dynamic_forward_proxy": "//source/extensions/clusters/dynamic_forward_proxy:cluster",
"envoy.clusters.eds": "//source/extensions/clusters/eds:eds_lib",
"envoy.clusters.redis": "//source/extensions/clusters/redis:redis_cluster",
"envoy.clusters.static": "//source/extensions/clusters/static:static_cluster_lib",
"envoy.clusters.strict_dns": "//source/extensions/clusters/strict_dns:strict_dns_cluster_lib",
"envoy.clusters.original_dst": "//source/extensions/clusters/original_dst:original_dst_cluster_lib",
"envoy.clusters.logical_dns": "//source/extensions/clusters/logical_dns:logical_dns_cluster_lib",

#
# Compression
Expand All @@ -42,27 +48,50 @@ ENVOY_EXTENSIONS = {
#

"envoy.bootstrap.wasm": "//source/extensions/bootstrap/wasm:config",
"envoy.bootstrap.internal_listener": "//source/extensions/bootstrap/internal_listener:config",

#
# Health checkers
#

"envoy.health_checkers.redis": "//source/extensions/health_checkers/redis:config",
"envoy.health_checkers.tcp": "//source/extensions/health_checkers/tcp:health_checker_lib",
"envoy.health_checkers.http": "//source/extensions/health_checkers/http:health_checker_lib",
"envoy.health_checkers.grpc": "//source/extensions/health_checkers/grpc:health_checker_lib",

#
# Input Matchers
#

"envoy.matching.input_matchers.consistent_hashing": "//source/extensions/matching/input_matchers/consistent_hashing:config",
"envoy.matching.input_matchers.ip": "//source/extensions/matching/input_matchers/ip:config",
"envoy.matching.matchers.consistent_hashing": "//source/extensions/matching/input_matchers/consistent_hashing:config",
"envoy.matching.matchers.ip": "//source/extensions/matching/input_matchers/ip:config",

#
# Network Matchers
#

"envoy.matching.inputs.application_protocol": "//source/extensions/matching/network/application_protocol:config",
# Ideally these would be split up. We'll do so if anyone cares.
"envoy.matching.inputs.destination_ip": "//source/extensions/matching/network/common:inputs_lib",
"envoy.matching.inputs.destination_port": "//source/extensions/matching/network/common:inputs_lib",
"envoy.matching.inputs.source_ip": "//source/extensions/matching/network/common:inputs_lib",
"envoy.matching.inputs.source_port": "//source/extensions/matching/network/common:inputs_lib",
"envoy.matching.inputs.direct_source_ip": "//source/extensions/matching/network/common:inputs_lib",
"envoy.matching.inputs.source_type": "//source/extensions/matching/network/common:inputs_lib",
"envoy.matching.inputs.server_name": "//source/extensions/matching/network/common:inputs_lib",
"envoy.matching.inputs.transport_protocol": "//source/extensions/matching/network/common:inputs_lib",

#
# Generic Inputs
#

"envoy.matching.common_inputs.environment_variable": "//source/extensions/matching/common_inputs/environment_variable:config",

#
# Matching actions
#

"envoy.matching.actions.format_string": "//source/extensions/matching/actions/format_string:config",

#
# HTTP filters
#
Expand Down Expand Up @@ -149,7 +178,7 @@ ENVOY_EXTENSIONS = {
# UDP filters
#

"envoy.filters.udp_listener.dns_filter": "//source/extensions/filters/udp/dns_filter:config",
"envoy.filters.udp.dns_filter": "//source/extensions/filters/udp/dns_filter:config",
"envoy.filters.udp_listener.udp_proxy": "//source/extensions/filters/udp/udp_proxy:config",

#
Expand All @@ -176,7 +205,7 @@ ENVOY_EXTENSIONS = {

"envoy.filters.thrift.router": "//source/extensions/filters/network/thrift_proxy/router:config",
"envoy.filters.thrift.header_to_metadata": "//source/extensions/filters/network/thrift_proxy/filters/header_to_metadata:config",
"envoy.filters.thrift.ratelimit": "//source/extensions/filters/network/thrift_proxy/filters/ratelimit:config",
"envoy.filters.thrift.rate_limit": "//source/extensions/filters/network/thrift_proxy/filters/ratelimit:config",

#
# Tracers
Expand All @@ -195,12 +224,12 @@ ENVOY_EXTENSIONS = {
#

"envoy.transport_sockets.alts": "//source/extensions/transport_sockets/alts:config",
"envoy.transport_sockets.internal_upstream": "//source/extensions/transport_sockets/internal_upstream:config",
"envoy.transport_sockets.upstream_proxy_protocol": "//source/extensions/transport_sockets/proxy_protocol:upstream_config",
"envoy.transport_sockets.raw_buffer": "//source/extensions/transport_sockets/raw_buffer:config",
"envoy.transport_sockets.tap": "//source/extensions/transport_sockets/tap:config",
"envoy.transport_sockets.starttls": "//source/extensions/transport_sockets/starttls:config",
"envoy.transport_sockets.tcp_stats": "//source/extensions/transport_sockets/tcp_stats:config",
"envoy.transport_sockets.internal_upstream": "//source/extensions/transport_sockets/internal_upstream:config",

#
# Retry host predicates
Expand All @@ -219,7 +248,7 @@ ENVOY_EXTENSIONS = {
#
# CacheFilter plugins
#
"envoy.cache.simple_http_cache": "//source/extensions/filters/http/cache/simple_http_cache:config",
"envoy.extensions.http.cache.simple": "//source/extensions/http/cache/simple_http_cache:config",

#
# Internal redirect predicates
Expand Down Expand Up @@ -263,6 +292,7 @@ ENVOY_EXTENSIONS = {
#

"envoy.io_socket.user_space": "//source/extensions/io_socket/user_space:config",
"envoy.bootstrap.internal_listener": "//source/extensions/bootstrap/internal_listener:config",

#
# TLS peer certification validators
Expand All @@ -288,14 +318,22 @@ ENVOY_EXTENSIONS = {
#

"envoy.http.stateful_session.cookie": "//source/extensions/http/stateful_session/cookie:config",
"envoy.http.stateful_session.header": "//source/extensions/http/stateful_session/header:config",

#
# Quic extensions
# QUIC extensions
#

"envoy.quic.deterministic_connection_id_generator": "//source/extensions/quic/connection_id_generator:envoy_deterministic_connection_id_generator_config",
"envoy.quic.crypto_stream.server.quiche": "//source/extensions/quic/crypto_stream:envoy_quic_default_crypto_server_stream",
"envoy.quic.proof_source.filter_chain": "//source/extensions/quic/proof_source:envoy_quic_default_proof_source",

#
# UDP packet writers
#
"envoy.udp_packet_writer.default": "//source/extensions/udp_packet_writer/default:config",
"envoy.udp_packet_writer.gso": "//source/extensions/udp_packet_writer/gso:config",

#
# Formatter
#
Expand All @@ -321,9 +359,27 @@ ENVOY_EXTENSIONS = {

# c-ares DNS resolver extension is recommended to be enabled to maintain the legacy DNS resolving behavior.
"envoy.network.dns_resolver.cares": "//source/extensions/network/dns_resolver/cares:config",

# apple DNS resolver extension is only needed in MacOS build plus one want to use apple library for DNS resolving.
"envoy.network.dns_resolver.apple": "//source/extensions/network/dns_resolver/apple:config",

#
# Custom matchers
#

"envoy.matching.custom_matchers.trie_matcher": "//source/extensions/common/matcher:trie_matcher_lib",

#
# Header Validators
#

"envoy.http.header_validators.envoy_default": "//source/extensions/http/header_validators/envoy_default:config",

#
# Config Subscription
#
"envoy.config_subscription.rest": "//source/extensions/config_subscription/rest:http_subscription_lib",
"envoy.config_subscription.filesystem": "//source/extensions/config_subscription/filesystem:filesystem_subscription_lib",
"envoy.config_subscription.filesystem_collection": "//source/extensions/config_subscription/filesystem:filesystem_subscription_lib",
}

ENVOY_CONTRIB_EXTENSIONS = {
Expand All @@ -332,6 +388,7 @@ ENVOY_CONTRIB_EXTENSIONS = {
#

"envoy.filters.http.dynamo": "//contrib/dynamo/filters/http/dynamo:config",
"envoy.filters.http.golang": "//contrib/golang/filters/http/source:config",
"envoy.filters.http.squash": "//contrib/squash/filters/http/source:config",
"envoy.filters.http.sxg": "//contrib/sxg/filters/http/source:config",

Expand All @@ -358,12 +415,19 @@ ENVOY_CONTRIB_EXTENSIONS = {
#

"envoy.tls.key_providers.cryptomb": "//contrib/cryptomb/private_key_providers/source:config",
"envoy.tls.key_providers.qat": "//contrib/qat/private_key_providers/source:config",

#
# Socket interface extensions
#

"envoy.bootstrap.vcl": "//contrib/vcl/source:config",

#
# Connection Balance extensions
#

"envoy.network.connection_balance.dlb": "//contrib/network/connection_balance/dlb/source:connection_balancer",
}


Expand All @@ -373,10 +437,14 @@ ISTIO_DISABLED_EXTENSIONS = [
]

ISTIO_ENABLED_CONTRIB_EXTENSIONS = [
"envoy.filters.http.golang",
"envoy.filters.network.mysql_proxy",
"envoy.filters.network.postgres_proxy",
"envoy.filters.network.sip_proxy",
"envoy.filters.sip.router",
"envoy.tls.key_providers.cryptomb",
"envoy.tls.key_providers.qat",
"envoy.network.connection_balance.dlb",
]

EXTENSIONS = dict([(k,v) for k,v in ENVOY_EXTENSIONS.items() if not k in ISTIO_DISABLED_EXTENSIONS] +
Expand All @@ -388,3 +456,6 @@ EXTENSIONS = dict([(k,v) for k,v in ENVOY_EXTENSIONS.items() if not k in ISTIO_D
EXTENSION_CONFIG_VISIBILITY = ["//visibility:public"]
EXTENSION_PACKAGE_VISIBILITY = ["//visibility:public"]
CONTRIB_EXTENSION_PACKAGE_VISIBILITY = ["//visibility:public"]
MOBILE_PACKAGE_VISIBILITY = ["//:mobile_library"]

LEGACY_ALWAYSLINK = True
83 changes: 0 additions & 83 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,89 +16,6 @@
#
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

GOOGLETEST = "d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0"
GOOGLETEST_SHA256 = "01508c8f47c99509130f128924f07f3a60be05d039cff571bb11d60bb11a3581"

def googletest_repositories(bind = True):
BUILD = """
# Copyright 2017 Istio Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
#
cc_library(
name = "googletest",
srcs = [
"googletest/src/gtest-all.cc",
"googlemock/src/gmock-all.cc",
],
hdrs = glob([
"googletest/include/**/*.h",
"googlemock/include/**/*.h",
"googletest/src/*.cc",
"googletest/src/*.h",
"googlemock/src/*.cc",
]),
includes = [
"googlemock",
"googletest",
"googletest/include",
"googlemock/include",
],
visibility = ["//visibility:public"],
)
cc_library(
name = "googletest_main",
srcs = ["googlemock/src/gmock_main.cc"],
visibility = ["//visibility:public"],
deps = [":googletest"],
)
cc_library(
name = "googletest_prod",
hdrs = [
"googletest/include/gtest/gtest_prod.h",
],
includes = [
"googletest/include",
],
visibility = ["//visibility:public"],
)
"""
http_archive(
name = "googletest_git",
build_file_content = BUILD,
strip_prefix = "googletest-" + GOOGLETEST,
url = "https://github.com/google/googletest/archive/" + GOOGLETEST + ".tar.gz",
sha256 = GOOGLETEST_SHA256,
)

if bind:
native.bind(
name = "googletest",
actual = "@googletest_git//:googletest",
)

native.bind(
name = "googletest_main",
actual = "@googletest_git//:googletest_main",
)

native.bind(
name = "googletest_prod",
actual = "@googletest_git//:googletest_prod",
)

#
# To update these...
# 1) find the ISTIO_API SHA you want in git
Expand Down

0 comments on commit b16b7cf

Please sign in to comment.