diff --git a/envoy/extensions/filters/http/lua/v3/BUILD b/envoy/extensions/filters/http/lua/v3/BUILD index 1c1a6f6b..a1775bbe 100644 --- a/envoy/extensions/filters/http/lua/v3/BUILD +++ b/envoy/extensions/filters/http/lua/v3/BUILD @@ -6,6 +6,7 @@ licenses(["notice"]) # Apache 2 api_proto_package( deps = [ + "//envoy/annotations:pkg", "//envoy/config/core/v3:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/envoy/extensions/filters/http/lua/v3/lua.proto b/envoy/extensions/filters/http/lua/v3/lua.proto index e406cd4a..198f6a3f 100644 --- a/envoy/extensions/filters/http/lua/v3/lua.proto +++ b/envoy/extensions/filters/http/lua/v3/lua.proto @@ -4,6 +4,7 @@ package envoy.extensions.filters.http.lua.v3; import "envoy/config/core/v3/base.proto"; +import "envoy/annotations/deprecation.proto"; import "udpa/annotations/status.proto"; import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; @@ -26,7 +27,14 @@ message Lua { // further loads code from disk if desired. Note that if JSON configuration is used, the code must // be properly escaped. YAML configuration may be easier to read since YAML supports multi-line // strings so complex scripts can be easily expressed inline in the configuration. - string inline_code = 1 [(validate.rules).string = {min_len: 1}]; + // + // This field is deprecated. Please use + // :ref:`default_source_code `. + // Only one of :ref:`inline_code ` + // or :ref:`default_source_code ` + // can be set for the Lua filter. + string inline_code = 1 + [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"]; // Map of named Lua source codes that can be referenced in :ref:`LuaPerRoute // `. The Lua source codes can be @@ -46,6 +54,10 @@ message Lua { // filename: /etc/lua/world.lua // map source_codes = 2; + + // The default Lua code that Envoy will execute. If no per route config is provided + // for the request, this Lua code will be applied. + config.core.v3.DataSource default_source_code = 3; } message LuaPerRoute {