diff --git a/api/BUILD b/api/BUILD index 0dafe82267e98..97a8554bc520d 100644 --- a/api/BUILD +++ b/api/BUILD @@ -101,7 +101,6 @@ proto_library( "//envoy/config/transport_socket/alts/v2alpha:pkg", "//envoy/config/transport_socket/raw_buffer/v2:pkg", "//envoy/config/transport_socket/tap/v2alpha:pkg", - "//envoy/config/wasm/v2alpha:pkg", "//envoy/data/accesslog/v2:pkg", "//envoy/data/cluster/v2alpha:pkg", "//envoy/data/core/v2alpha:pkg", diff --git a/api/envoy/config/wasm/v2alpha/BUILD b/api/envoy/config/wasm/v2alpha/BUILD deleted file mode 100644 index 69168ad0cf246..0000000000000 --- a/api/envoy/config/wasm/v2alpha/BUILD +++ /dev/null @@ -1,12 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/api/v2/core:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto deleted file mode 100644 index b8f050a23d2b0..0000000000000 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ /dev/null @@ -1,83 +0,0 @@ -syntax = "proto3"; - -package envoy.config.wasm.v2alpha; - -import "envoy/api/v2/core/base.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.wasm.v2alpha"; -option java_outer_classname = "WasmProto"; -option java_multiple_files = true; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.wasm.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Wasm service] - -// Configuration for a Wasm VM. -// [#next-free-field: 6] -// [#not-implemented-hide:] pending implementation. -message VmConfig { - // An ID which will be used along with a hash of the wasm code (or the name of the registered Null - // VM plugin) to determine which VM will be used for the plugin. All plugins which use the same - // *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can - // reduce memory utilization and make sharing of data easier which may have security implications. - // See ref: "TODO: add ref" for details. - string vm_id = 1; - - // The Wasm runtime type (either "v8" or "null" for code compiled into Envoy). - string runtime = 2 [(validate.rules).string = {min_bytes: 1}]; - - // The Wasm code that Envoy will execute. - api.v2.core.AsyncDataSource code = 3; - - // The Wasm configuration used in initialization of a new VM (proxy_on_start). - google.protobuf.Any configuration = 4; - - // Allow the wasm file to include pre-compiled code on VMs which support it. - // Warning: this should only be enable for trusted sources as the precompiled code is not - // verified. - bool allow_precompiled = 5; -} - -// Base Configuration for Wasm Plugins e.g. filters and services. -// [#next-free-field: 6] -// [#not-implemented-hide:] pending implementation. -message PluginConfig { - // A unique name for a filters/services in a VM for use in identifying the filter/service if - // multiple filters/services are handled by the same *vm_id* and *group_name* and for - // logging/debugging. - string name = 1; - - // A unique ID for a set of filters/services in a VM which will share a RootContext and Contexts - // if applicable (e.g. an Wasm HttpFilter and an Wasm AccessLog). If left blank, all - // filters/services with a blank group_name with the same *vm_id* will share Context(s). - string group_name = 2; - - // Configuration for finding or starting VM. - oneof vm_config { - VmConfig inline_vm_config = 3; - // In the future add referential VM configurations. - } - - // Filter/service configuration used to configure or reconfigure a plugin - // (proxy_on_configuration). - google.protobuf.Any configuration = 5; -} - -// WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig -// `. This opaque configuration will be used to -// create a Wasm Service. -// [#not-implemented-hide:] pending implementation. -message WasmService { - // General plugin configuration. - PluginConfig config = 1; - - // If true, create a single VM rather than creating one VM per worker. Such a singleton can - // not be used with filters. - bool singleton = 2; -} diff --git a/api/envoy/extensions/wasm/v3/BUILD b/api/envoy/extensions/wasm/v3/BUILD index d29790ff5e75b..2c3dad6453b65 100644 --- a/api/envoy/extensions/wasm/v3/BUILD +++ b/api/envoy/extensions/wasm/v3/BUILD @@ -7,7 +7,6 @@ licenses(["notice"]) # Apache 2 api_proto_package( deps = [ "//envoy/config/core/v3:pkg", - "//envoy/config/wasm/v2alpha:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], ) diff --git a/api/envoy/extensions/wasm/v3/wasm.proto b/api/envoy/extensions/wasm/v3/wasm.proto index 8cbaf20a39061..73b7959cd95da 100644 --- a/api/envoy/extensions/wasm/v3/wasm.proto +++ b/api/envoy/extensions/wasm/v3/wasm.proto @@ -21,8 +21,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#next-free-field: 6] // [#not-implemented-hide:] pending implementation. message VmConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.VmConfig"; - // An ID which will be used along with a hash of the wasm code (or the name of the registered Null // VM plugin) to determine which VM will be used for the plugin. All plugins which use the same // *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can @@ -36,7 +34,10 @@ message VmConfig { // The Wasm code that Envoy will execute. config.core.v3.AsyncDataSource code = 3; - // The Wasm configuration used in initialization of a new VM (proxy_on_start). + // The Wasm configuration used in initialization of a new VM + // (proxy_on_start). `google.protobuf.Struct` is serialized as JSON before + // passing it to the plugin. `google.protobuf.BytesValue` and + // `google.protobuf.StringValue` are passed directly without the wrapper. google.protobuf.Any configuration = 4; // Allow the wasm file to include pre-compiled code on VMs which support it. @@ -49,9 +50,6 @@ message VmConfig { // [#next-free-field: 6] // [#not-implemented-hide:] pending implementation. message PluginConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.wasm.v2alpha.PluginConfig"; - // A unique name for a filters/services in a VM for use in identifying the filter/service if // multiple filters/services are handled by the same *vm_id* and *group_name* and for // logging/debugging. @@ -70,6 +68,9 @@ message PluginConfig { // Filter/service configuration used to configure or reconfigure a plugin // (proxy_on_configuration). + // `google.protobuf.Struct` is serialized as JSON before + // passing it to the plugin. `google.protobuf.BytesValue` and + // `google.protobuf.StringValue` are passed directly without the wrapper. google.protobuf.Any configuration = 5; } @@ -78,9 +79,6 @@ message PluginConfig { // create a Wasm Service. // [#not-implemented-hide:] pending implementation. message WasmService { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.wasm.v2alpha.WasmService"; - // General plugin configuration. PluginConfig config = 1; diff --git a/api/versioning/BUILD b/api/versioning/BUILD index 0ffaf85a1cdd0..bbb683d8bd087 100644 --- a/api/versioning/BUILD +++ b/api/versioning/BUILD @@ -224,7 +224,6 @@ proto_library( "//envoy/config/transport_socket/alts/v2alpha:pkg", "//envoy/config/transport_socket/raw_buffer/v2:pkg", "//envoy/config/transport_socket/tap/v2alpha:pkg", - "//envoy/config/wasm/v2alpha:pkg", "//envoy/data/accesslog/v2:pkg", "//envoy/data/cluster/v2alpha:pkg", "//envoy/data/core/v2alpha:pkg", diff --git a/docs/root/api-v2/config/config.rst b/docs/root/api-v2/config/config.rst index feaa9c5b0c9aa..8fe20069ebc7f 100644 --- a/docs/root/api-v2/config/config.rst +++ b/docs/root/api-v2/config/config.rst @@ -17,4 +17,3 @@ Extensions grpc_credential/grpc_credential retry/retry trace/trace - wasm/wasm diff --git a/docs/root/api-v2/config/wasm/wasm.rst b/docs/root/api-v2/config/wasm/wasm.rst deleted file mode 100644 index 8ce884b18ba5e..0000000000000 --- a/docs/root/api-v2/config/wasm/wasm.rst +++ /dev/null @@ -1,8 +0,0 @@ -WASM -==== - -.. toctree:: - :glob: - :maxdepth: 2 - - v2alpha/* diff --git a/generated_api_shadow/BUILD b/generated_api_shadow/BUILD index a028250022dd9..6aafa3e75588a 100644 --- a/generated_api_shadow/BUILD +++ b/generated_api_shadow/BUILD @@ -111,7 +111,6 @@ proto_library( "//envoy/config/transport_socket/alts/v2alpha:pkg", "//envoy/config/transport_socket/raw_buffer/v2:pkg", "//envoy/config/transport_socket/tap/v2alpha:pkg", - "//envoy/config/wasm/v2alpha:pkg", "//envoy/data/accesslog/v2:pkg", "//envoy/data/accesslog/v3:pkg", "//envoy/data/cluster/v2alpha:pkg", diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/BUILD b/generated_api_shadow/envoy/config/wasm/v2alpha/BUILD deleted file mode 100644 index 69168ad0cf246..0000000000000 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/BUILD +++ /dev/null @@ -1,12 +0,0 @@ -# DO NOT EDIT. This file is generated by tools/proto_sync.py. - -load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") - -licenses(["notice"]) # Apache 2 - -api_proto_package( - deps = [ - "//envoy/api/v2/core:pkg", - "@com_github_cncf_udpa//udpa/annotations:pkg", - ], -) diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto deleted file mode 100644 index b8f050a23d2b0..0000000000000 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto +++ /dev/null @@ -1,83 +0,0 @@ -syntax = "proto3"; - -package envoy.config.wasm.v2alpha; - -import "envoy/api/v2/core/base.proto"; - -import "google/protobuf/any.proto"; - -import "udpa/annotations/migrate.proto"; -import "udpa/annotations/status.proto"; -import "validate/validate.proto"; - -option java_package = "io.envoyproxy.envoy.config.wasm.v2alpha"; -option java_outer_classname = "WasmProto"; -option java_multiple_files = true; -option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.wasm.v3"; -option (udpa.annotations.file_status).package_version_status = FROZEN; - -// [#protodoc-title: Wasm service] - -// Configuration for a Wasm VM. -// [#next-free-field: 6] -// [#not-implemented-hide:] pending implementation. -message VmConfig { - // An ID which will be used along with a hash of the wasm code (or the name of the registered Null - // VM plugin) to determine which VM will be used for the plugin. All plugins which use the same - // *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can - // reduce memory utilization and make sharing of data easier which may have security implications. - // See ref: "TODO: add ref" for details. - string vm_id = 1; - - // The Wasm runtime type (either "v8" or "null" for code compiled into Envoy). - string runtime = 2 [(validate.rules).string = {min_bytes: 1}]; - - // The Wasm code that Envoy will execute. - api.v2.core.AsyncDataSource code = 3; - - // The Wasm configuration used in initialization of a new VM (proxy_on_start). - google.protobuf.Any configuration = 4; - - // Allow the wasm file to include pre-compiled code on VMs which support it. - // Warning: this should only be enable for trusted sources as the precompiled code is not - // verified. - bool allow_precompiled = 5; -} - -// Base Configuration for Wasm Plugins e.g. filters and services. -// [#next-free-field: 6] -// [#not-implemented-hide:] pending implementation. -message PluginConfig { - // A unique name for a filters/services in a VM for use in identifying the filter/service if - // multiple filters/services are handled by the same *vm_id* and *group_name* and for - // logging/debugging. - string name = 1; - - // A unique ID for a set of filters/services in a VM which will share a RootContext and Contexts - // if applicable (e.g. an Wasm HttpFilter and an Wasm AccessLog). If left blank, all - // filters/services with a blank group_name with the same *vm_id* will share Context(s). - string group_name = 2; - - // Configuration for finding or starting VM. - oneof vm_config { - VmConfig inline_vm_config = 3; - // In the future add referential VM configurations. - } - - // Filter/service configuration used to configure or reconfigure a plugin - // (proxy_on_configuration). - google.protobuf.Any configuration = 5; -} - -// WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig -// `. This opaque configuration will be used to -// create a Wasm Service. -// [#not-implemented-hide:] pending implementation. -message WasmService { - // General plugin configuration. - PluginConfig config = 1; - - // If true, create a single VM rather than creating one VM per worker. Such a singleton can - // not be used with filters. - bool singleton = 2; -} diff --git a/generated_api_shadow/envoy/extensions/wasm/v3/BUILD b/generated_api_shadow/envoy/extensions/wasm/v3/BUILD index d29790ff5e75b..2c3dad6453b65 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3/BUILD +++ b/generated_api_shadow/envoy/extensions/wasm/v3/BUILD @@ -7,7 +7,6 @@ licenses(["notice"]) # Apache 2 api_proto_package( deps = [ "//envoy/config/core/v3:pkg", - "//envoy/config/wasm/v2alpha:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], ) diff --git a/generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto index 16cae01897e03..73b7959cd95da 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto @@ -21,8 +21,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // [#next-free-field: 6] // [#not-implemented-hide:] pending implementation. message VmConfig { - option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.VmConfig"; - // An ID which will be used along with a hash of the wasm code (or the name of the registered Null // VM plugin) to determine which VM will be used for the plugin. All plugins which use the same // *vm_id* and code will use the same VM. May be left blank. Sharing a VM between plugins can @@ -36,7 +34,10 @@ message VmConfig { // The Wasm code that Envoy will execute. config.core.v3.AsyncDataSource code = 3; - // The Wasm configuration used in initialization of a new VM (proxy_on_start). + // The Wasm configuration used in initialization of a new VM + // (proxy_on_start). `google.protobuf.Struct` is serialized as JSON before + // passing it to the plugin. `google.protobuf.BytesValue` and + // `google.protobuf.StringValue` are passed directly without the wrapper. google.protobuf.Any configuration = 4; // Allow the wasm file to include pre-compiled code on VMs which support it. @@ -49,9 +50,6 @@ message VmConfig { // [#next-free-field: 6] // [#not-implemented-hide:] pending implementation. message PluginConfig { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.wasm.v2alpha.PluginConfig"; - // A unique name for a filters/services in a VM for use in identifying the filter/service if // multiple filters/services are handled by the same *vm_id* and *group_name* and for // logging/debugging. @@ -62,15 +60,18 @@ message PluginConfig { // filters/services with a blank group_name with the same *vm_id* will share Context(s). string group_name = 2; - google.protobuf.Any configuration = 5; - // In the future add referential VM configurations. - // Configuration for finding or starting VM. oneof vm_config { - // Filter/service configuration used to configure or reconfigure a plugin - // (proxy_on_configuration). VmConfig inline_vm_config = 3; + // In the future add referential VM configurations. } + + // Filter/service configuration used to configure or reconfigure a plugin + // (proxy_on_configuration). + // `google.protobuf.Struct` is serialized as JSON before + // passing it to the plugin. `google.protobuf.BytesValue` and + // `google.protobuf.StringValue` are passed directly without the wrapper. + google.protobuf.Any configuration = 5; } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig @@ -78,9 +79,6 @@ message PluginConfig { // create a Wasm Service. // [#not-implemented-hide:] pending implementation. message WasmService { - option (udpa.annotations.versioning).previous_message_type = - "envoy.config.wasm.v2alpha.WasmService"; - // General plugin configuration. PluginConfig config = 1;