From 6bd8d543664b96c8ebde08bf28b61cac281ded93 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Fri, 6 Dec 2019 22:20:53 +0000 Subject: [PATCH 01/26] Proxy-WASM configuration protos. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2/BUILD | 9 ++++ api/envoy/config/wasm/v2/wasm.proto | 68 ++++++++++++++++++++++++ api/envoy/config/wasm/v3alpha/BUILD | 9 ++++ api/envoy/config/wasm/v3alpha/wasm.proto | 68 ++++++++++++++++++++++++ 4 files changed, 154 insertions(+) create mode 100644 api/envoy/config/wasm/v2/BUILD create mode 100644 api/envoy/config/wasm/v2/wasm.proto create mode 100644 api/envoy/config/wasm/v3alpha/BUILD create mode 100644 api/envoy/config/wasm/v3alpha/wasm.proto diff --git a/api/envoy/config/wasm/v2/BUILD b/api/envoy/config/wasm/v2/BUILD new file mode 100644 index 0000000000000..97eb16ccddad1 --- /dev/null +++ b/api/envoy/config/wasm/v2/BUILD @@ -0,0 +1,9 @@ +# 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"], +) diff --git a/api/envoy/config/wasm/v2/wasm.proto b/api/envoy/config/wasm/v2/wasm.proto new file mode 100644 index 0000000000000..670d8ad84d47c --- /dev/null +++ b/api/envoy/config/wasm/v2/wasm.proto @@ -0,0 +1,68 @@ +syntax = "proto3"; + +package envoy.config.wasm.v2; + +option java_outer_classname = "WasmProto"; +option java_multiple_files = true; +option java_package = "io.envoyproxy.envoy.config.wasm.v2"; + +import "envoy/api/v2/core/base.proto"; + +import "validate/validate.proto"; + +// [#protodoc-title: Wasm service] + +// Configuration for a Wasm VM. +// [#next-free-field: 6] +message VmConfig { + // An ID which will be used along with a hash of the wasm code (or null_vm_id) 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. + string vm_id = 1; + + // The Wasm runtime type (see source/extensions/common/wasm/well_known_names.h). + string runtime = 2; + + // The Wasm code that Envoy will execute. + api.v2.core.AsyncDataSource code = 3; + + // The Wasm configuration string used on initialization of a new VM (proxy_onStart). + string configuration = 4; + + // Allow the wasm file to include pre-compiled code on VMs which support it. + bool allow_precompiled = 5; +} + +// Base Configuration for Wasm Plugins e.g. filters and services. +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 root_id 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 root_id with the same vm_id will share Context(s). + string root_id = 2; + + // Configuration for finding or starting VM. + VmConfig vm_config = 3; + + // Filter/service configuration string e.g. a serialized protobuf which will be the + // argument to the proxy_onConfigure() call. + string configuration = 4; +} + +// WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig +// `. This opaque configuration will be used to +// create a Wasm Service. +message WasmService { + // General plugin configuration. + PluginConfig config = 1; + + // If true, create a single VM rather than creating one VM per silo. Such a singleton can + // not be used with filters. + bool singleton = 2; + + // If set add 'stat_prefix' as a prefix to all stats. + string stat_prefix = 3; +} diff --git a/api/envoy/config/wasm/v3alpha/BUILD b/api/envoy/config/wasm/v3alpha/BUILD new file mode 100644 index 0000000000000..4e89d949ab9d5 --- /dev/null +++ b/api/envoy/config/wasm/v3alpha/BUILD @@ -0,0 +1,9 @@ +# 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/v3alpha/core:pkg"], +) diff --git a/api/envoy/config/wasm/v3alpha/wasm.proto b/api/envoy/config/wasm/v3alpha/wasm.proto new file mode 100644 index 0000000000000..1ac9dc1e69f61 --- /dev/null +++ b/api/envoy/config/wasm/v3alpha/wasm.proto @@ -0,0 +1,68 @@ +syntax = "proto3"; + +package envoy.config.wasm.v3alpha; + +option java_outer_classname = "WasmProto"; +option java_multiple_files = true; +option java_package = "io.envoyproxy.envoy.config.wasm.v3alpha"; + +import "envoy/api/v3alpha/core/base.proto"; + +import "validate/validate.proto"; + +// [#protodoc-title: Wasm service] + +// Configuration for a Wasm VM. +// [#next-free-field: 6] +message VmConfig { + // An ID which will be used along with a hash of the wasm code (or null_vm_id) 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. + string vm_id = 1; + + // The Wasm runtime type (see source/extensions/common/wasm/well_known_names.h). + string runtime = 2; + + // The Wasm code that Envoy will execute. + api.v3alpha.core.AsyncDataSource code = 3; + + // The Wasm configuration string used on initialization of a new VM (proxy_onStart). + string configuration = 4; + + // Allow the wasm file to include pre-compiled code on VMs which support it. + bool allow_precompiled = 5; +} + +// Base Configuration for Wasm Plugins e.g. filters and services. +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 root_id 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 root_id with the same vm_id will share Context(s). + string root_id = 2; + + // Configuration for finding or starting VM. + VmConfig vm_config = 3; + + // Filter/service configuration string e.g. a serialized protobuf which will be the + // argument to the proxy_onConfigure() call. + string configuration = 4; +} + +// WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig +// `. This opaque configuration will be used to +// create a Wasm Service. +message WasmService { + // General plugin configuration. + PluginConfig config = 1; + + // If true, create a single VM rather than creating one VM per silo. Such a singleton can + // not be used with filters. + bool singleton = 2; + + // If set add 'stat_prefix' as a prefix to all stats. + string stat_prefix = 3; +} From 65083ee1b32159b9355a5dd1b992aed42a279b05 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Thu, 12 Dec 2019 22:37:45 +0000 Subject: [PATCH 02/26] Address comments. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2/wasm.proto | 13 ++++++------- api/envoy/config/wasm/v3alpha/wasm.proto | 15 +++++++-------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/api/envoy/config/wasm/v2/wasm.proto b/api/envoy/config/wasm/v2/wasm.proto index 670d8ad84d47c..5a0c8748ecee2 100644 --- a/api/envoy/config/wasm/v2/wasm.proto +++ b/api/envoy/config/wasm/v2/wasm.proto @@ -17,17 +17,17 @@ import "validate/validate.proto"; message VmConfig { // An ID which will be used along with a hash of the wasm code (or null_vm_id) 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. + // 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 (see source/extensions/common/wasm/well_known_names.h). + // The Wasm runtime type (either "v8" or "null" for code comipled into Envoy). string runtime = 2; // The Wasm code that Envoy will execute. api.v2.core.AsyncDataSource code = 3; - // The Wasm configuration string used on initialization of a new VM (proxy_onStart). - string configuration = 4; + // 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. bool allow_precompiled = 5; @@ -47,9 +47,8 @@ message PluginConfig { // Configuration for finding or starting VM. VmConfig vm_config = 3; - // Filter/service configuration string e.g. a serialized protobuf which will be the - // argument to the proxy_onConfigure() call. - string configuration = 4; + // Filter/service configuration used to configurre or reconfigure a plugin (proxy_on_configuration). + google.protobuf.Any configuration = 4; } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig diff --git a/api/envoy/config/wasm/v3alpha/wasm.proto b/api/envoy/config/wasm/v3alpha/wasm.proto index 1ac9dc1e69f61..ff0ea4c573b36 100644 --- a/api/envoy/config/wasm/v3alpha/wasm.proto +++ b/api/envoy/config/wasm/v3alpha/wasm.proto @@ -17,17 +17,17 @@ import "validate/validate.proto"; message VmConfig { // An ID which will be used along with a hash of the wasm code (or null_vm_id) 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. + // 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 (see source/extensions/common/wasm/well_known_names.h). + // The Wasm runtime type (either "v8" or "null" for code comipled into Envoy). string runtime = 2; // The Wasm code that Envoy will execute. api.v3alpha.core.AsyncDataSource code = 3; - // The Wasm configuration string used on initialization of a new VM (proxy_onStart). - string configuration = 4; + // 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. bool allow_precompiled = 5; @@ -47,13 +47,12 @@ message PluginConfig { // Configuration for finding or starting VM. VmConfig vm_config = 3; - // Filter/service configuration string e.g. a serialized protobuf which will be the - // argument to the proxy_onConfigure() call. - string configuration = 4; + // Filter/service configuration used to configurre or reconfigure a plugin (proxy_on_configuration). + google.protobuf.Any configuration = 4; } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig -// `. This opaque configuration will be used to +// `. This opaque configuration will be used to // create a Wasm Service. message WasmService { // General plugin configuration. From 0d63b3ce881355adeecb8ba426ba7966f0c4610e Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Thu, 12 Dec 2019 22:42:59 +0000 Subject: [PATCH 03/26] Address comments. Signed-off-by: John Plevyak --- api/envoy/config/wasm/{v2 => v2apha}/BUILD | 0 api/envoy/config/wasm/{v2 => v2apha}/wasm.proto | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) rename api/envoy/config/wasm/{v2 => v2apha}/BUILD (100%) rename api/envoy/config/wasm/{v2 => v2apha}/wasm.proto (92%) diff --git a/api/envoy/config/wasm/v2/BUILD b/api/envoy/config/wasm/v2apha/BUILD similarity index 100% rename from api/envoy/config/wasm/v2/BUILD rename to api/envoy/config/wasm/v2apha/BUILD diff --git a/api/envoy/config/wasm/v2/wasm.proto b/api/envoy/config/wasm/v2apha/wasm.proto similarity index 92% rename from api/envoy/config/wasm/v2/wasm.proto rename to api/envoy/config/wasm/v2apha/wasm.proto index 5a0c8748ecee2..e07689b995a48 100644 --- a/api/envoy/config/wasm/v2/wasm.proto +++ b/api/envoy/config/wasm/v2apha/wasm.proto @@ -1,10 +1,10 @@ syntax = "proto3"; -package envoy.config.wasm.v2; +package envoy.config.wasm.v2alpha; option java_outer_classname = "WasmProto"; option java_multiple_files = true; -option java_package = "io.envoyproxy.envoy.config.wasm.v2"; +option java_package = "io.envoyproxy.envoy.config.wasm.v2alpha"; import "envoy/api/v2/core/base.proto"; @@ -52,7 +52,7 @@ message PluginConfig { } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig -// `. This opaque configuration will be used to +// `. This opaque configuration will be used to // create a Wasm Service. message WasmService { // General plugin configuration. From e84976799124996a5f3a1db8b8c41460b024fe8a Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Thu, 12 Dec 2019 22:46:02 +0000 Subject: [PATCH 04/26] Address comments. Signed-off-by: John Plevyak --- api/envoy/config/wasm/{v2apha => v2alpha}/BUILD | 0 api/envoy/config/wasm/{v2apha => v2alpha}/wasm.proto | 4 ++-- api/envoy/config/wasm/v3alpha/wasm.proto | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename api/envoy/config/wasm/{v2apha => v2alpha}/BUILD (100%) rename api/envoy/config/wasm/{v2apha => v2alpha}/wasm.proto (94%) diff --git a/api/envoy/config/wasm/v2apha/BUILD b/api/envoy/config/wasm/v2alpha/BUILD similarity index 100% rename from api/envoy/config/wasm/v2apha/BUILD rename to api/envoy/config/wasm/v2alpha/BUILD diff --git a/api/envoy/config/wasm/v2apha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto similarity index 94% rename from api/envoy/config/wasm/v2apha/wasm.proto rename to api/envoy/config/wasm/v2alpha/wasm.proto index e07689b995a48..9394e340bcb38 100644 --- a/api/envoy/config/wasm/v2apha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -21,7 +21,7 @@ message VmConfig { string vm_id = 1; // The Wasm runtime type (either "v8" or "null" for code comipled into Envoy). - string runtime = 2; + string runtime = 2 {validate.rules).string = {min_bytes: 2}; // The Wasm code that Envoy will execute. api.v2.core.AsyncDataSource code = 3; @@ -62,6 +62,6 @@ message WasmService { // not be used with filters. bool singleton = 2; - // If set add 'stat_prefix' as a prefix to all stats. + // If set add 'stat_prefix' as a prefix to all stats. May be left blank. string stat_prefix = 3; } diff --git a/api/envoy/config/wasm/v3alpha/wasm.proto b/api/envoy/config/wasm/v3alpha/wasm.proto index ff0ea4c573b36..8dd90dbfb4646 100644 --- a/api/envoy/config/wasm/v3alpha/wasm.proto +++ b/api/envoy/config/wasm/v3alpha/wasm.proto @@ -21,7 +21,7 @@ message VmConfig { string vm_id = 1; // The Wasm runtime type (either "v8" or "null" for code comipled into Envoy). - string runtime = 2; + string runtime = 2 {validate.rules).string = {min_bytes: 2}; // The Wasm code that Envoy will execute. api.v3alpha.core.AsyncDataSource code = 3; From 03915326ac699b825e56afca6372b99c2a2e75ef Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Fri, 13 Dec 2019 19:28:19 +0000 Subject: [PATCH 05/26] Fix annotation. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 2 +- api/envoy/config/wasm/v3alpha/wasm.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index 9394e340bcb38..9c2b4a1165203 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -21,7 +21,7 @@ message VmConfig { string vm_id = 1; // The Wasm runtime type (either "v8" or "null" for code comipled into Envoy). - string runtime = 2 {validate.rules).string = {min_bytes: 2}; + string runtime = 2 {validate.rules).string = {min_bytes: 2}}; // The Wasm code that Envoy will execute. api.v2.core.AsyncDataSource code = 3; diff --git a/api/envoy/config/wasm/v3alpha/wasm.proto b/api/envoy/config/wasm/v3alpha/wasm.proto index 8dd90dbfb4646..39c77cc9a0740 100644 --- a/api/envoy/config/wasm/v3alpha/wasm.proto +++ b/api/envoy/config/wasm/v3alpha/wasm.proto @@ -21,7 +21,7 @@ message VmConfig { string vm_id = 1; // The Wasm runtime type (either "v8" or "null" for code comipled into Envoy). - string runtime = 2 {validate.rules).string = {min_bytes: 2}; + string runtime = 2 {validate.rules).string = {min_bytes: 2}}; // The Wasm code that Envoy will execute. api.v3alpha.core.AsyncDataSource code = 3; From bdfcdde0c2e1418d2b3bf98e376470849483ddf9 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Wed, 18 Dec 2019 19:07:02 +0000 Subject: [PATCH 06/26] Address comments. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 4 ++-- api/envoy/config/wasm/v3alpha/wasm.proto | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index 9c2b4a1165203..b037fd3963029 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -20,8 +20,8 @@ message VmConfig { // 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 comipled into Envoy). - string runtime = 2 {validate.rules).string = {min_bytes: 2}}; + // 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; diff --git a/api/envoy/config/wasm/v3alpha/wasm.proto b/api/envoy/config/wasm/v3alpha/wasm.proto index 39c77cc9a0740..28497bff82406 100644 --- a/api/envoy/config/wasm/v3alpha/wasm.proto +++ b/api/envoy/config/wasm/v3alpha/wasm.proto @@ -20,8 +20,8 @@ message VmConfig { // 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 comipled into Envoy). - string runtime = 2 {validate.rules).string = {min_bytes: 2}}; + // 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.v3alpha.core.AsyncDataSource code = 3; From 51fcb4d0793aa7a2639f3ded5fe2ac74e185593c Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Mon, 23 Dec 2019 19:41:37 +0000 Subject: [PATCH 07/26] Fix format and add any.proto. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 4 +++- api/envoy/config/wasm/v3alpha/wasm.proto | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index b037fd3963029..4956ee90c2298 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -8,6 +8,8 @@ option java_package = "io.envoyproxy.envoy.config.wasm.v2alpha"; import "envoy/api/v2/core/base.proto"; +import "google/protobuf/any.proto"; + import "validate/validate.proto"; // [#protodoc-title: Wasm service] @@ -21,7 +23,7 @@ message VmConfig { 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}}; + string runtime = 2 [(validate.rules).string = {min_bytes: 1}]; // The Wasm code that Envoy will execute. api.v2.core.AsyncDataSource code = 3; diff --git a/api/envoy/config/wasm/v3alpha/wasm.proto b/api/envoy/config/wasm/v3alpha/wasm.proto index 28497bff82406..e449ccf69c481 100644 --- a/api/envoy/config/wasm/v3alpha/wasm.proto +++ b/api/envoy/config/wasm/v3alpha/wasm.proto @@ -8,6 +8,8 @@ option java_package = "io.envoyproxy.envoy.config.wasm.v3alpha"; import "envoy/api/v3alpha/core/base.proto"; +import "google/protobuf/any.proto"; + import "validate/validate.proto"; // [#protodoc-title: Wasm service] @@ -21,7 +23,7 @@ message VmConfig { 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}}; + string runtime = 2 [(validate.rules).string = {min_bytes: 1}]; // The Wasm code that Envoy will execute. api.v3alpha.core.AsyncDataSource code = 3; From 9154661b69e264d7bbabc846be2386509620c1d1 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Tue, 24 Dec 2019 00:08:13 +0000 Subject: [PATCH 08/26] Fix formatting. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 7 +++++-- api/envoy/config/wasm/v3alpha/wasm.proto | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index 4956ee90c2298..8dc63207f3076 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -19,7 +19,9 @@ import "validate/validate.proto"; message VmConfig { // An ID which will be used along with a hash of the wasm code (or null_vm_id) 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. + // 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). @@ -49,7 +51,8 @@ message PluginConfig { // Configuration for finding or starting VM. VmConfig vm_config = 3; - // Filter/service configuration used to configurre or reconfigure a plugin (proxy_on_configuration). + // Filter/service configuration used to configure or reconfigure a plugin + // (proxy_on_configuration). google.protobuf.Any configuration = 4; } diff --git a/api/envoy/config/wasm/v3alpha/wasm.proto b/api/envoy/config/wasm/v3alpha/wasm.proto index e449ccf69c481..6c7db1bedc62c 100644 --- a/api/envoy/config/wasm/v3alpha/wasm.proto +++ b/api/envoy/config/wasm/v3alpha/wasm.proto @@ -19,7 +19,9 @@ import "validate/validate.proto"; message VmConfig { // An ID which will be used along with a hash of the wasm code (or null_vm_id) 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. + // 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). @@ -49,7 +51,8 @@ message PluginConfig { // Configuration for finding or starting VM. VmConfig vm_config = 3; - // Filter/service configuration used to configurre or reconfigure a plugin (proxy_on_configuration). + // Filter/service configuration used to configure or reconfigure a plugin + // (proxy_on_configuration). google.protobuf.Any configuration = 4; } From de0f3654593c8460e72d0cd5881a762084515452 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Mon, 30 Dec 2019 19:10:46 +0000 Subject: [PATCH 09/26] Apply formatting fixes. Signed-off-by: John Plevyak --- api/BUILD | 2 ++ api/docs/BUILD | 1 + api/envoy/config/wasm/v2alpha/wasm.proto | 8 ++++---- api/envoy/config/wasm/v3alpha/BUILD | 6 +++++- api/envoy/config/wasm/v3alpha/wasm.proto | 20 +++++++++++++++----- generated_api_shadow/BUILD | 2 ++ 6 files changed, 29 insertions(+), 10 deletions(-) diff --git a/api/BUILD b/api/BUILD index 1b4044aa47958..af62cf58d85bb 100644 --- a/api/BUILD +++ b/api/BUILD @@ -125,6 +125,8 @@ proto_library( "//envoy/config/transport_socket/alts/v2alpha:pkg", "//envoy/config/transport_socket/tap/v2alpha:pkg", "//envoy/config/transport_socket/tap/v3alpha:pkg", + "//envoy/config/wasm/v2alpha:pkg", + "//envoy/config/wasm/v3alpha:pkg", "//envoy/data/accesslog/v2:pkg", "//envoy/data/accesslog/v3alpha:pkg", "//envoy/data/cluster/v2alpha:pkg", diff --git a/api/docs/BUILD b/api/docs/BUILD index 024c0760ebf80..bf2516f700a59 100644 --- a/api/docs/BUILD +++ b/api/docs/BUILD @@ -85,6 +85,7 @@ proto_library( "//envoy/config/trace/v2alpha:pkg", "//envoy/config/transport_socket/alts/v2alpha: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/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index 8dc63207f3076..1ff88d197f6ff 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -2,16 +2,16 @@ syntax = "proto3"; package envoy.config.wasm.v2alpha; -option java_outer_classname = "WasmProto"; -option java_multiple_files = true; -option java_package = "io.envoyproxy.envoy.config.wasm.v2alpha"; - import "envoy/api/v2/core/base.proto"; import "google/protobuf/any.proto"; import "validate/validate.proto"; +option java_package = "io.envoyproxy.envoy.config.wasm.v2alpha"; +option java_outer_classname = "WasmProto"; +option java_multiple_files = true; + // [#protodoc-title: Wasm service] // Configuration for a Wasm VM. diff --git a/api/envoy/config/wasm/v3alpha/BUILD b/api/envoy/config/wasm/v3alpha/BUILD index 4e89d949ab9d5..2a9e2a376064f 100644 --- a/api/envoy/config/wasm/v3alpha/BUILD +++ b/api/envoy/config/wasm/v3alpha/BUILD @@ -5,5 +5,9 @@ load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v3alpha/core:pkg"], + deps = [ + "//envoy/api/v3alpha/core:pkg", + "//envoy/config/wasm/v2alpha:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], ) diff --git a/api/envoy/config/wasm/v3alpha/wasm.proto b/api/envoy/config/wasm/v3alpha/wasm.proto index 6c7db1bedc62c..d4f7495760fe9 100644 --- a/api/envoy/config/wasm/v3alpha/wasm.proto +++ b/api/envoy/config/wasm/v3alpha/wasm.proto @@ -2,21 +2,25 @@ syntax = "proto3"; package envoy.config.wasm.v3alpha; -option java_outer_classname = "WasmProto"; -option java_multiple_files = true; -option java_package = "io.envoyproxy.envoy.config.wasm.v3alpha"; - import "envoy/api/v3alpha/core/base.proto"; import "google/protobuf/any.proto"; +import "udpa/annotations/versioning.proto"; + import "validate/validate.proto"; +option java_package = "io.envoyproxy.envoy.config.wasm.v3alpha"; +option java_outer_classname = "WasmProto"; +option java_multiple_files = true; + // [#protodoc-title: Wasm service] // Configuration for a Wasm VM. // [#next-free-field: 6] 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 null_vm_id) 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 @@ -39,6 +43,9 @@ message VmConfig { // Base Configuration for Wasm Plugins e.g. filters and services. 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 root_id and for logging/debugging. string name = 1; @@ -60,6 +67,9 @@ message PluginConfig { // `. This opaque configuration will be used to // create a Wasm Service. message WasmService { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.wasm.v2alpha.WasmService"; + // General plugin configuration. PluginConfig config = 1; @@ -67,6 +77,6 @@ message WasmService { // not be used with filters. bool singleton = 2; - // If set add 'stat_prefix' as a prefix to all stats. + // If set add 'stat_prefix' as a prefix to all stats. May be left blank. string stat_prefix = 3; } diff --git a/generated_api_shadow/BUILD b/generated_api_shadow/BUILD index 1b4044aa47958..af62cf58d85bb 100644 --- a/generated_api_shadow/BUILD +++ b/generated_api_shadow/BUILD @@ -125,6 +125,8 @@ proto_library( "//envoy/config/transport_socket/alts/v2alpha:pkg", "//envoy/config/transport_socket/tap/v2alpha:pkg", "//envoy/config/transport_socket/tap/v3alpha:pkg", + "//envoy/config/wasm/v2alpha:pkg", + "//envoy/config/wasm/v3alpha:pkg", "//envoy/data/accesslog/v2:pkg", "//envoy/data/accesslog/v3alpha:pkg", "//envoy/data/cluster/v2alpha:pkg", From d7a45d5294ff3657034405f4cebe7ae63711dd72 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Mon, 30 Dec 2019 20:17:34 +0000 Subject: [PATCH 10/26] Add doc. Signed-off-by: John Plevyak --- docs/root/api-v2/config/wasm/wasm.rst | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/root/api-v2/config/wasm/wasm.rst diff --git a/docs/root/api-v2/config/wasm/wasm.rst b/docs/root/api-v2/config/wasm/wasm.rst new file mode 100644 index 0000000000000..8ce884b18ba5e --- /dev/null +++ b/docs/root/api-v2/config/wasm/wasm.rst @@ -0,0 +1,8 @@ +WASM +==== + +.. toctree:: + :glob: + :maxdepth: 2 + + v2alpha/* From 707b8e89f35029919a860c380910e68827df7e62 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Mon, 30 Dec 2019 21:04:26 +0000 Subject: [PATCH 11/26] Add to toctree Signed-off-by: John Plevyak --- docs/root/api-v2/config/config.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/root/api-v2/config/config.rst b/docs/root/api-v2/config/config.rst index 10015222fe8e3..096a652fb7d17 100644 --- a/docs/root/api-v2/config/config.rst +++ b/docs/root/api-v2/config/config.rst @@ -16,3 +16,4 @@ Extensions listener/listener grpc_credential/grpc_credential retry/retry + wasm/wasm From 99536f0c98c6f2f3f07e9b60361faa3a3fc74b18 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Tue, 14 Jan 2020 17:48:12 +0000 Subject: [PATCH 12/26] Update as per architecture document. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 3 --- api/envoy/config/wasm/v3alpha/wasm.proto | 3 --- 2 files changed, 6 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index e21a4f049cc51..2dfb560824def 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -66,7 +66,4 @@ message WasmService { // If true, create a single VM rather than creating one VM per silo. Such a singleton can // not be used with filters. bool singleton = 2; - - // If set add 'stat_prefix' as a prefix to all stats. May be left blank. - string stat_prefix = 3; } diff --git a/api/envoy/config/wasm/v3alpha/wasm.proto b/api/envoy/config/wasm/v3alpha/wasm.proto index ad7886e8bafc7..28c9a282199c6 100644 --- a/api/envoy/config/wasm/v3alpha/wasm.proto +++ b/api/envoy/config/wasm/v3alpha/wasm.proto @@ -76,7 +76,4 @@ message WasmService { // If true, create a single VM rather than creating one VM per silo. Such a singleton can // not be used with filters. bool singleton = 2; - - // If set add 'stat_prefix' as a prefix to all stats. May be left blank. - string stat_prefix = 3; } From 0cfc5e7e6780d03fbb9fd5ef26438136b919d7de Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Tue, 14 Jan 2020 18:05:07 +0000 Subject: [PATCH 13/26] Fix format. Signed-off-by: John Plevyak --- test/integration/BUILD | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/integration/BUILD b/test/integration/BUILD index 710fadc9c81df..0bf1f8a1976ac 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -351,9 +351,6 @@ envoy_cc_test( "//source/extensions/filters/http/health_check:config", "//test/integration/filters:random_pause_filter_lib", "//test/test_common:utility_lib", - "@envoy_api//envoy/config/bootstrap/v3alpha:pkg_cc_proto", - "@envoy_api//envoy/config/route/v3alpha:pkg_cc_proto", - "@envoy_api//envoy/extensions/filters/network/http_connection_manager/v3alpha:pkg_cc_proto", ], ) From ba960dd2ba6978061a0fc8b912e0da6facef3f33 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Tue, 14 Jan 2020 18:46:15 +0000 Subject: [PATCH 14/26] Fix format. Signed-off-by: John Plevyak --- test/integration/BUILD | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/integration/BUILD b/test/integration/BUILD index 41a978f2ec255..4d49fbf846d99 100644 --- a/test/integration/BUILD +++ b/test/integration/BUILD @@ -351,6 +351,9 @@ envoy_cc_test( "//source/extensions/filters/http/health_check:config", "//test/integration/filters:random_pause_filter_lib", "//test/test_common:utility_lib", + "@envoy_api//envoy/config/bootstrap/v3alpha:pkg_cc_proto", + "@envoy_api//envoy/config/route/v3alpha:pkg_cc_proto", + "@envoy_api//envoy/extensions/filters/network/http_connection_manager/v3alpha:pkg_cc_proto", ], ) From 7984aafadff34b8870f449d8e52227123e5adc03 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Wed, 15 Jan 2020 19:07:28 +0000 Subject: [PATCH 15/26] Fix format. Signed-off-by: John Plevyak --- api/BUILD | 2 +- api/envoy/config/wasm/v2alpha/BUILD | 5 +- api/envoy/config/wasm/v2alpha/wasm.proto | 2 + .../{config => extensions}/wasm/v3alpha/BUILD | 0 .../wasm/v3alpha/wasm.proto | 8 +- generated_api_shadow/BUILD | 2 +- .../envoy/config/wasm/v2alpha/BUILD | 12 +++ .../envoy/config/wasm/v2alpha/wasm.proto | 71 +++++++++++++++++ .../envoy/extensions/wasm/v3alpha/BUILD | 13 +++ .../envoy/extensions/wasm/v3alpha/wasm.proto | 79 +++++++++++++++++++ 10 files changed, 187 insertions(+), 7 deletions(-) rename api/envoy/{config => extensions}/wasm/v3alpha/BUILD (100%) rename api/envoy/{config => extensions}/wasm/v3alpha/wasm.proto (91%) create mode 100644 generated_api_shadow/envoy/config/wasm/v2alpha/BUILD create mode 100644 generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto create mode 100644 generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD create mode 100644 generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto diff --git a/api/BUILD b/api/BUILD index ec555c9f6cb93..8ec540929d1c0 100644 --- a/api/BUILD +++ b/api/BUILD @@ -110,7 +110,6 @@ proto_library( "//envoy/config/transport_socket/raw_buffer/v2:pkg", "//envoy/config/transport_socket/tap/v2alpha:pkg", "//envoy/config/wasm/v2alpha:pkg", - "//envoy/config/wasm/v3alpha:pkg", "//envoy/data/accesslog/v2:pkg", "//envoy/data/accesslog/v3alpha:pkg", "//envoy/data/cluster/v2alpha:pkg", @@ -181,6 +180,7 @@ proto_library( "//envoy/extensions/transport_sockets/raw_buffer/v3alpha:pkg", "//envoy/extensions/transport_sockets/tap/v3alpha:pkg", "//envoy/extensions/transport_sockets/tls/v3alpha:pkg", + "//envoy/extensions/wasm/v3alpha:pkg", "//envoy/service/accesslog/v2:pkg", "//envoy/service/accesslog/v3alpha:pkg", "//envoy/service/auth/v2:pkg", diff --git a/api/envoy/config/wasm/v2alpha/BUILD b/api/envoy/config/wasm/v2alpha/BUILD index 97eb16ccddad1..69168ad0cf246 100644 --- a/api/envoy/config/wasm/v2alpha/BUILD +++ b/api/envoy/config/wasm/v2alpha/BUILD @@ -5,5 +5,8 @@ load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package") licenses(["notice"]) # Apache 2 api_proto_package( - deps = ["//envoy/api/v2/core:pkg"], + 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 index 2dfb560824def..892985dc57ad9 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -6,11 +6,13 @@ import "envoy/api/v2/core/base.proto"; import "google/protobuf/any.proto"; +import "udpa/annotations/migrate.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.v3alpha"; // [#protodoc-title: Wasm service] diff --git a/api/envoy/config/wasm/v3alpha/BUILD b/api/envoy/extensions/wasm/v3alpha/BUILD similarity index 100% rename from api/envoy/config/wasm/v3alpha/BUILD rename to api/envoy/extensions/wasm/v3alpha/BUILD diff --git a/api/envoy/config/wasm/v3alpha/wasm.proto b/api/envoy/extensions/wasm/v3alpha/wasm.proto similarity index 91% rename from api/envoy/config/wasm/v3alpha/wasm.proto rename to api/envoy/extensions/wasm/v3alpha/wasm.proto index 28c9a282199c6..da36fd41c0f05 100644 --- a/api/envoy/config/wasm/v3alpha/wasm.proto +++ b/api/envoy/extensions/wasm/v3alpha/wasm.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package envoy.config.wasm.v3alpha; +package envoy.extensions.wasm.v3alpha; import "envoy/config/core/v3alpha/base.proto"; @@ -10,7 +10,7 @@ import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.config.wasm.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.wasm.v3alpha"; option java_outer_classname = "WasmProto"; option java_multiple_files = true; @@ -32,7 +32,7 @@ message VmConfig { string runtime = 2 [(validate.rules).string = {min_bytes: 1}]; // The Wasm code that Envoy will execute. - core.v3alpha.AsyncDataSource code = 3; + config.core.v3alpha.AsyncDataSource code = 3; // The Wasm configuration used in initialization of a new VM (proxy_on_start). google.protobuf.Any configuration = 4; @@ -64,7 +64,7 @@ message PluginConfig { } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig -// `. This opaque configuration will be used to +// `. This opaque configuration will be used to // create a Wasm Service. message WasmService { option (udpa.annotations.versioning).previous_message_type = diff --git a/generated_api_shadow/BUILD b/generated_api_shadow/BUILD index ec555c9f6cb93..8ec540929d1c0 100644 --- a/generated_api_shadow/BUILD +++ b/generated_api_shadow/BUILD @@ -110,7 +110,6 @@ proto_library( "//envoy/config/transport_socket/raw_buffer/v2:pkg", "//envoy/config/transport_socket/tap/v2alpha:pkg", "//envoy/config/wasm/v2alpha:pkg", - "//envoy/config/wasm/v3alpha:pkg", "//envoy/data/accesslog/v2:pkg", "//envoy/data/accesslog/v3alpha:pkg", "//envoy/data/cluster/v2alpha:pkg", @@ -181,6 +180,7 @@ proto_library( "//envoy/extensions/transport_sockets/raw_buffer/v3alpha:pkg", "//envoy/extensions/transport_sockets/tap/v3alpha:pkg", "//envoy/extensions/transport_sockets/tls/v3alpha:pkg", + "//envoy/extensions/wasm/v3alpha:pkg", "//envoy/service/accesslog/v2:pkg", "//envoy/service/accesslog/v3alpha:pkg", "//envoy/service/auth/v2:pkg", diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/BUILD b/generated_api_shadow/envoy/config/wasm/v2alpha/BUILD new file mode 100644 index 0000000000000..69168ad0cf246 --- /dev/null +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/BUILD @@ -0,0 +1,12 @@ +# 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 new file mode 100644 index 0000000000000..892985dc57ad9 --- /dev/null +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto @@ -0,0 +1,71 @@ +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 "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.v3alpha"; + +// [#protodoc-title: Wasm service] + +// Configuration for a Wasm VM. +// [#next-free-field: 6] +message VmConfig { + // An ID which will be used along with a hash of the wasm code (or null_vm_id) 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. + bool allow_precompiled = 5; +} + +// Base Configuration for Wasm Plugins e.g. filters and services. +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 root_id 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. + VmConfig vm_config = 3; + + // Filter/service configuration used to configure or reconfigure a plugin + // (proxy_on_configuration). + google.protobuf.Any configuration = 4; +} + +// WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig +// `. This opaque configuration will be used to +// create a Wasm Service. +message WasmService { + // General plugin configuration. + PluginConfig config = 1; + + // If true, create a single VM rather than creating one VM per silo. Such a singleton can + // not be used with filters. + bool singleton = 2; +} diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD b/generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD new file mode 100644 index 0000000000000..cd799bc3bce86 --- /dev/null +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD @@ -0,0 +1,13 @@ +# 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/config/core/v3alpha:pkg", + "//envoy/config/wasm/v2alpha:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto new file mode 100644 index 0000000000000..da36fd41c0f05 --- /dev/null +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto @@ -0,0 +1,79 @@ +syntax = "proto3"; + +package envoy.extensions.wasm.v3alpha; + +import "envoy/config/core/v3alpha/base.proto"; + +import "google/protobuf/any.proto"; + +import "udpa/annotations/versioning.proto"; + +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.wasm.v3alpha"; +option java_outer_classname = "WasmProto"; +option java_multiple_files = true; + +// [#protodoc-title: Wasm service] + +// Configuration for a Wasm VM. +// [#next-free-field: 6] +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 null_vm_id) 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. + config.core.v3alpha.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. + bool allow_precompiled = 5; +} + +// Base Configuration for Wasm Plugins e.g. filters and services. +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 root_id 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. + VmConfig vm_config = 3; + + // Filter/service configuration used to configure or reconfigure a plugin + // (proxy_on_configuration). + google.protobuf.Any configuration = 4; +} + +// WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig +// `. This opaque configuration will be used to +// create a Wasm Service. +message WasmService { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.wasm.v2alpha.WasmService"; + + // General plugin configuration. + PluginConfig config = 1; + + // If true, create a single VM rather than creating one VM per silo. Such a singleton can + // not be used with filters. + bool singleton = 2; +} From f687b1886629cff2199356d2f36f3daffb1ac2f1 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Wed, 15 Jan 2020 20:04:59 +0000 Subject: [PATCH 16/26] Fix wrt architecture doc. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 9 +++++++-- api/envoy/extensions/wasm/v3alpha/wasm.proto | 9 +++++++-- .../envoy/config/wasm/v2alpha/wasm.proto | 9 +++++++-- .../envoy/extensions/wasm/v3alpha/wasm.proto | 9 +++++++-- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index 892985dc57ad9..f195b619ccf0c 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -40,6 +40,7 @@ message VmConfig { } // Base Configuration for Wasm Plugins e.g. filters and services. +// [#next-free-field: 6] 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 root_id and for logging/debugging. @@ -51,11 +52,15 @@ message PluginConfig { string group_name = 2; // Configuration for finding or starting VM. - VmConfig vm_config = 3; + oneof vm_config { + VmConfig inline_vm_config = 3; + + string vm_id = 4; + } // Filter/service configuration used to configure or reconfigure a plugin // (proxy_on_configuration). - google.protobuf.Any configuration = 4; + google.protobuf.Any configuration = 5; } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig diff --git a/api/envoy/extensions/wasm/v3alpha/wasm.proto b/api/envoy/extensions/wasm/v3alpha/wasm.proto index da36fd41c0f05..4f21c3bbeb93b 100644 --- a/api/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/api/envoy/extensions/wasm/v3alpha/wasm.proto @@ -42,6 +42,7 @@ message VmConfig { } // Base Configuration for Wasm Plugins e.g. filters and services. +// [#next-free-field: 6] message PluginConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.PluginConfig"; @@ -56,11 +57,15 @@ message PluginConfig { string group_name = 2; // Configuration for finding or starting VM. - VmConfig vm_config = 3; + oneof vm_config { + VmConfig inline_vm_config = 3; + + string vm_id = 4; + } // Filter/service configuration used to configure or reconfigure a plugin // (proxy_on_configuration). - google.protobuf.Any configuration = 4; + google.protobuf.Any configuration = 5; } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto index 892985dc57ad9..f195b619ccf0c 100644 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto @@ -40,6 +40,7 @@ message VmConfig { } // Base Configuration for Wasm Plugins e.g. filters and services. +// [#next-free-field: 6] 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 root_id and for logging/debugging. @@ -51,11 +52,15 @@ message PluginConfig { string group_name = 2; // Configuration for finding or starting VM. - VmConfig vm_config = 3; + oneof vm_config { + VmConfig inline_vm_config = 3; + + string vm_id = 4; + } // Filter/service configuration used to configure or reconfigure a plugin // (proxy_on_configuration). - google.protobuf.Any configuration = 4; + google.protobuf.Any configuration = 5; } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto index da36fd41c0f05..4f21c3bbeb93b 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto @@ -42,6 +42,7 @@ message VmConfig { } // Base Configuration for Wasm Plugins e.g. filters and services. +// [#next-free-field: 6] message PluginConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.PluginConfig"; @@ -56,11 +57,15 @@ message PluginConfig { string group_name = 2; // Configuration for finding or starting VM. - VmConfig vm_config = 3; + oneof vm_config { + VmConfig inline_vm_config = 3; + + string vm_id = 4; + } // Filter/service configuration used to configure or reconfigure a plugin // (proxy_on_configuration). - google.protobuf.Any configuration = 4; + google.protobuf.Any configuration = 5; } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig From 96e1a6eaf23e0f56a48c65d3da2b02ed96ec7265 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Thu, 16 Jan 2020 01:17:31 +0000 Subject: [PATCH 17/26] Update WRT Architecture document. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 3 +-- api/envoy/extensions/wasm/v3alpha/wasm.proto | 3 +-- generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto | 3 +-- generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index f195b619ccf0c..d8ece4b040628 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -54,8 +54,7 @@ message PluginConfig { // Configuration for finding or starting VM. oneof vm_config { VmConfig inline_vm_config = 3; - - string vm_id = 4; + // In the future add referential VM configurations. } // Filter/service configuration used to configure or reconfigure a plugin diff --git a/api/envoy/extensions/wasm/v3alpha/wasm.proto b/api/envoy/extensions/wasm/v3alpha/wasm.proto index 4f21c3bbeb93b..97080dbc7c1f5 100644 --- a/api/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/api/envoy/extensions/wasm/v3alpha/wasm.proto @@ -59,8 +59,7 @@ message PluginConfig { // Configuration for finding or starting VM. oneof vm_config { VmConfig inline_vm_config = 3; - - string vm_id = 4; + // In the future add referential VM configurations. } // Filter/service configuration used to configure or reconfigure a plugin diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto index f195b619ccf0c..d8ece4b040628 100644 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto @@ -54,8 +54,7 @@ message PluginConfig { // Configuration for finding or starting VM. oneof vm_config { VmConfig inline_vm_config = 3; - - string vm_id = 4; + // In the future add referential VM configurations. } // Filter/service configuration used to configure or reconfigure a plugin diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto index 4f21c3bbeb93b..97080dbc7c1f5 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto @@ -59,8 +59,7 @@ message PluginConfig { // Configuration for finding or starting VM. oneof vm_config { VmConfig inline_vm_config = 3; - - string vm_id = 4; + // In the future add referential VM configurations. } // Filter/service configuration used to configure or reconfigure a plugin From a7765634ba2e1e797b8911fb23f4eccdf3c091a1 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Thu, 16 Jan 2020 03:29:42 +0000 Subject: [PATCH 18/26] Fix format. Signed-off-by: John Plevyak --- api/BUILD | 1 + api/envoy/extensions/wasm/v3alpha/BUILD | 2 +- api/envoy/extensions/wasm/v3alpha/wasm.proto | 4 ++-- generated_api_shadow/BUILD | 1 + generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD | 2 +- generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto | 4 ++-- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/api/BUILD b/api/BUILD index e0ab8f4b77564..c570125d0ea94 100644 --- a/api/BUILD +++ b/api/BUILD @@ -180,6 +180,7 @@ proto_library( "//envoy/extensions/transport_sockets/raw_buffer/v3:pkg", "//envoy/extensions/transport_sockets/tap/v3:pkg", "//envoy/extensions/transport_sockets/tls/v3:pkg", + "//envoy/extensions/wasm/v3alpha:pkg", "//envoy/service/accesslog/v2:pkg", "//envoy/service/accesslog/v3:pkg", "//envoy/service/auth/v2:pkg", diff --git a/api/envoy/extensions/wasm/v3alpha/BUILD b/api/envoy/extensions/wasm/v3alpha/BUILD index cd799bc3bce86..d29790ff5e75b 100644 --- a/api/envoy/extensions/wasm/v3alpha/BUILD +++ b/api/envoy/extensions/wasm/v3alpha/BUILD @@ -6,7 +6,7 @@ licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/config/core/v3alpha:pkg", + "//envoy/config/core/v3:pkg", "//envoy/config/wasm/v2alpha:pkg", "@com_github_cncf_udpa//udpa/annotations:pkg", ], diff --git a/api/envoy/extensions/wasm/v3alpha/wasm.proto b/api/envoy/extensions/wasm/v3alpha/wasm.proto index 97080dbc7c1f5..fb444360c98c9 100644 --- a/api/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/api/envoy/extensions/wasm/v3alpha/wasm.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package envoy.extensions.wasm.v3alpha; -import "envoy/config/core/v3alpha/base.proto"; +import "envoy/config/core/v3/base.proto"; import "google/protobuf/any.proto"; @@ -32,7 +32,7 @@ message VmConfig { string runtime = 2 [(validate.rules).string = {min_bytes: 1}]; // The Wasm code that Envoy will execute. - config.core.v3alpha.AsyncDataSource code = 3; + config.core.v3.AsyncDataSource code = 3; // The Wasm configuration used in initialization of a new VM (proxy_on_start). google.protobuf.Any configuration = 4; diff --git a/generated_api_shadow/BUILD b/generated_api_shadow/BUILD index e0ab8f4b77564..c570125d0ea94 100644 --- a/generated_api_shadow/BUILD +++ b/generated_api_shadow/BUILD @@ -180,6 +180,7 @@ proto_library( "//envoy/extensions/transport_sockets/raw_buffer/v3:pkg", "//envoy/extensions/transport_sockets/tap/v3:pkg", "//envoy/extensions/transport_sockets/tls/v3:pkg", + "//envoy/extensions/wasm/v3alpha:pkg", "//envoy/service/accesslog/v2:pkg", "//envoy/service/accesslog/v3:pkg", "//envoy/service/auth/v2:pkg", diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD b/generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD index cd799bc3bce86..d29790ff5e75b 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD @@ -6,7 +6,7 @@ licenses(["notice"]) # Apache 2 api_proto_package( deps = [ - "//envoy/config/core/v3alpha:pkg", + "//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/v3alpha/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto index 97080dbc7c1f5..fb444360c98c9 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package envoy.extensions.wasm.v3alpha; -import "envoy/config/core/v3alpha/base.proto"; +import "envoy/config/core/v3/base.proto"; import "google/protobuf/any.proto"; @@ -32,7 +32,7 @@ message VmConfig { string runtime = 2 [(validate.rules).string = {min_bytes: 1}]; // The Wasm code that Envoy will execute. - config.core.v3alpha.AsyncDataSource code = 3; + config.core.v3.AsyncDataSource code = 3; // The Wasm configuration used in initialization of a new VM (proxy_on_start). google.protobuf.Any configuration = 4; From 680dcbe9c90d094ed6b3cc34d7bb711f722dd754 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Thu, 16 Jan 2020 19:09:10 +0000 Subject: [PATCH 19/26] Address comments. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 3 +++ api/envoy/extensions/wasm/v3alpha/wasm.proto | 3 +++ generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto | 3 +++ generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto | 3 +++ 4 files changed, 12 insertions(+) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index d8ece4b040628..6ef78f2e94c48 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -18,6 +18,7 @@ option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.wasm. // 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 null_vm_id) to determine which // VM will be used for the plugin. All plugins which use the same vm_id and code will use the same @@ -41,6 +42,7 @@ message VmConfig { // 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 root_id and for logging/debugging. @@ -65,6 +67,7 @@ message PluginConfig { // 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; diff --git a/api/envoy/extensions/wasm/v3alpha/wasm.proto b/api/envoy/extensions/wasm/v3alpha/wasm.proto index fb444360c98c9..f9918564eea0f 100644 --- a/api/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/api/envoy/extensions/wasm/v3alpha/wasm.proto @@ -18,6 +18,7 @@ option java_multiple_files = true; // Configuration for a Wasm VM. // [#next-free-field: 6] +// [#not-implemented-hide:] pending implementation. message VmConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.VmConfig"; @@ -43,6 +44,7 @@ message VmConfig { // Base Configuration for Wasm Plugins e.g. filters and services. // [#next-free-field: 6] +// [#not-implemented-hide:] pending implementation. message PluginConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.PluginConfig"; @@ -70,6 +72,7 @@ message PluginConfig { // 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 { option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.WasmService"; diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto index d8ece4b040628..6ef78f2e94c48 100644 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto @@ -18,6 +18,7 @@ option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.wasm. // 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 null_vm_id) to determine which // VM will be used for the plugin. All plugins which use the same vm_id and code will use the same @@ -41,6 +42,7 @@ message VmConfig { // 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 root_id and for logging/debugging. @@ -65,6 +67,7 @@ message PluginConfig { // 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; diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto index fb444360c98c9..f9918564eea0f 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto @@ -18,6 +18,7 @@ option java_multiple_files = true; // Configuration for a Wasm VM. // [#next-free-field: 6] +// [#not-implemented-hide:] pending implementation. message VmConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.VmConfig"; @@ -43,6 +44,7 @@ message VmConfig { // Base Configuration for Wasm Plugins e.g. filters and services. // [#next-free-field: 6] +// [#not-implemented-hide:] pending implementation. message PluginConfig { option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.PluginConfig"; @@ -70,6 +72,7 @@ message PluginConfig { // 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 { option (udpa.annotations.versioning).previous_message_type = "envoy.config.wasm.v2alpha.WasmService"; From eda760c1cdbeeafba387c78c15d98bdce007fbc0 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Thu, 16 Jan 2020 23:37:35 +0000 Subject: [PATCH 20/26] Address comments. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 10 +++++----- api/envoy/extensions/wasm/v3alpha/wasm.proto | 10 +++++----- .../envoy/config/wasm/v2alpha/wasm.proto | 10 +++++----- .../envoy/extensions/wasm/v3alpha/wasm.proto | 10 +++++----- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index 6ef78f2e94c48..c8708d85c95ae 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -20,11 +20,11 @@ option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.wasm. // [#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 null_vm_id) 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. + // 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). diff --git a/api/envoy/extensions/wasm/v3alpha/wasm.proto b/api/envoy/extensions/wasm/v3alpha/wasm.proto index f9918564eea0f..53d562e3cd1fc 100644 --- a/api/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/api/envoy/extensions/wasm/v3alpha/wasm.proto @@ -22,11 +22,11 @@ option java_multiple_files = true; 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 null_vm_id) 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. + // 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). diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto index 6ef78f2e94c48..c8708d85c95ae 100644 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto @@ -20,11 +20,11 @@ option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.wasm. // [#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 null_vm_id) 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. + // 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). diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto index f9918564eea0f..53d562e3cd1fc 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto @@ -22,11 +22,11 @@ option java_multiple_files = true; 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 null_vm_id) 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. + // 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). From f8c1fb1ca8ce5500e45b33bbc06f98e4b384a78d Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Thu, 16 Jan 2020 23:42:20 +0000 Subject: [PATCH 21/26] Address comments. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 2 +- api/envoy/extensions/wasm/v3alpha/wasm.proto | 2 +- generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto | 2 +- generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index c8708d85c95ae..9c71303c111a6 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -72,7 +72,7 @@ message WasmService { // General plugin configuration. PluginConfig config = 1; - // If true, create a single VM rather than creating one VM per silo. Such a singleton can + // 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/v3alpha/wasm.proto b/api/envoy/extensions/wasm/v3alpha/wasm.proto index 53d562e3cd1fc..2b07973903fef 100644 --- a/api/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/api/envoy/extensions/wasm/v3alpha/wasm.proto @@ -80,7 +80,7 @@ message WasmService { // General plugin configuration. PluginConfig config = 1; - // If true, create a single VM rather than creating one VM per silo. Such a singleton can + // 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/config/wasm/v2alpha/wasm.proto b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto index c8708d85c95ae..9c71303c111a6 100644 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto @@ -72,7 +72,7 @@ message WasmService { // General plugin configuration. PluginConfig config = 1; - // If true, create a single VM rather than creating one VM per silo. Such a singleton can + // 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/v3alpha/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto index 53d562e3cd1fc..2b07973903fef 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto @@ -80,7 +80,7 @@ message WasmService { // General plugin configuration. PluginConfig config = 1; - // If true, create a single VM rather than creating one VM per silo. Such a singleton can + // 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; } From 3abf419a5cbe1817f261cf871224222a4e87360e Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Thu, 16 Jan 2020 23:49:34 +0000 Subject: [PATCH 22/26] Address comments. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 11 ++++++----- api/envoy/extensions/wasm/v3alpha/wasm.proto | 11 ++++++----- .../envoy/config/wasm/v2alpha/wasm.proto | 11 ++++++----- .../envoy/extensions/wasm/v3alpha/wasm.proto | 11 ++++++----- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index 9c71303c111a6..e4e8ee2280400 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -22,9 +22,9 @@ option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.wasm. 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. + // *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). @@ -45,12 +45,13 @@ message VmConfig { // [#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 root_id and for logging/debugging. + // 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). + // 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. diff --git a/api/envoy/extensions/wasm/v3alpha/wasm.proto b/api/envoy/extensions/wasm/v3alpha/wasm.proto index 2b07973903fef..cd875ba449d9d 100644 --- a/api/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/api/envoy/extensions/wasm/v3alpha/wasm.proto @@ -24,9 +24,9 @@ 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. + // *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). @@ -50,12 +50,13 @@ message PluginConfig { "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 root_id and for logging/debugging. + // 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). + // 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. diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto index 9c71303c111a6..e4e8ee2280400 100644 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto @@ -22,9 +22,9 @@ option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.wasm. 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. + // *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). @@ -45,12 +45,13 @@ message VmConfig { // [#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 root_id and for logging/debugging. + // 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). + // 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. diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto index 2b07973903fef..cd875ba449d9d 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto @@ -24,9 +24,9 @@ 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. + // *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). @@ -50,12 +50,13 @@ message PluginConfig { "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 root_id and for logging/debugging. + // 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). + // 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. From 494fa9c3349a2f2ef73b11eb2e5164c631e4a5d5 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Fri, 17 Jan 2020 22:15:00 +0000 Subject: [PATCH 23/26] Address comments. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 1 + api/envoy/extensions/wasm/v3alpha/wasm.proto | 1 + generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto | 1 + generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto | 1 + 4 files changed, 4 insertions(+) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index e4e8ee2280400..84b70cb107bf3 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -37,6 +37,7 @@ message VmConfig { google.protobuf.Any configuration = 4; // Allow the wasm file to include pre-compiled code on VMs which support it. + // This should only be enable for trusted sources as the precompiled code is not verified. bool allow_precompiled = 5; } diff --git a/api/envoy/extensions/wasm/v3alpha/wasm.proto b/api/envoy/extensions/wasm/v3alpha/wasm.proto index cd875ba449d9d..f37b6435b0000 100644 --- a/api/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/api/envoy/extensions/wasm/v3alpha/wasm.proto @@ -39,6 +39,7 @@ message VmConfig { google.protobuf.Any configuration = 4; // Allow the wasm file to include pre-compiled code on VMs which support it. + // This should only be enable for trusted sources as the precompiled code is not verified. bool allow_precompiled = 5; } diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto index e4e8ee2280400..84b70cb107bf3 100644 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto @@ -37,6 +37,7 @@ message VmConfig { google.protobuf.Any configuration = 4; // Allow the wasm file to include pre-compiled code on VMs which support it. + // This should only be enable for trusted sources as the precompiled code is not verified. bool allow_precompiled = 5; } diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto index cd875ba449d9d..f37b6435b0000 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto @@ -39,6 +39,7 @@ message VmConfig { google.protobuf.Any configuration = 4; // Allow the wasm file to include pre-compiled code on VMs which support it. + // This should only be enable for trusted sources as the precompiled code is not verified. bool allow_precompiled = 5; } From 0573d68ebd4f6dc3532a092e377c8771ee3f4cf0 Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Tue, 21 Jan 2020 18:29:29 +0000 Subject: [PATCH 24/26] Address comments. Signed-off-by: John Plevyak --- api/BUILD | 2 +- api/envoy/config/wasm/v2alpha/wasm.proto | 2 +- api/envoy/extensions/wasm/{v3alpha => v3}/BUILD | 0 api/envoy/extensions/wasm/{v3alpha => v3}/wasm.proto | 6 +++--- generated_api_shadow/BUILD | 2 +- generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto | 2 +- .../envoy/extensions/wasm/{v3alpha => v3}/BUILD | 0 .../envoy/extensions/wasm/{v3alpha => v3}/wasm.proto | 6 +++--- 8 files changed, 10 insertions(+), 10 deletions(-) rename api/envoy/extensions/wasm/{v3alpha => v3}/BUILD (100%) rename api/envoy/extensions/wasm/{v3alpha => v3}/wasm.proto (93%) rename generated_api_shadow/envoy/extensions/wasm/{v3alpha => v3}/BUILD (100%) rename generated_api_shadow/envoy/extensions/wasm/{v3alpha => v3}/wasm.proto (93%) diff --git a/api/BUILD b/api/BUILD index c570125d0ea94..c2130181a3362 100644 --- a/api/BUILD +++ b/api/BUILD @@ -180,7 +180,7 @@ proto_library( "//envoy/extensions/transport_sockets/raw_buffer/v3:pkg", "//envoy/extensions/transport_sockets/tap/v3:pkg", "//envoy/extensions/transport_sockets/tls/v3:pkg", - "//envoy/extensions/wasm/v3alpha:pkg", + "//envoy/extensions/wasm/v3:pkg", "//envoy/service/accesslog/v2:pkg", "//envoy/service/accesslog/v3:pkg", "//envoy/service/auth/v2:pkg", diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index 84b70cb107bf3..240e571fe2fea 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -12,7 +12,7 @@ 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.v3alpha"; +option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.wasm.v3"; // [#protodoc-title: Wasm service] diff --git a/api/envoy/extensions/wasm/v3alpha/BUILD b/api/envoy/extensions/wasm/v3/BUILD similarity index 100% rename from api/envoy/extensions/wasm/v3alpha/BUILD rename to api/envoy/extensions/wasm/v3/BUILD diff --git a/api/envoy/extensions/wasm/v3alpha/wasm.proto b/api/envoy/extensions/wasm/v3/wasm.proto similarity index 93% rename from api/envoy/extensions/wasm/v3alpha/wasm.proto rename to api/envoy/extensions/wasm/v3/wasm.proto index f37b6435b0000..5dd874f25522c 100644 --- a/api/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/api/envoy/extensions/wasm/v3/wasm.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package envoy.extensions.wasm.v3alpha; +package envoy.extensions.wasm.v3; import "envoy/config/core/v3/base.proto"; @@ -10,7 +10,7 @@ import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.wasm.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.wasm.v3"; option java_outer_classname = "WasmProto"; option java_multiple_files = true; @@ -72,7 +72,7 @@ message PluginConfig { } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig -// `. This opaque configuration will be used to +// `. This opaque configuration will be used to // create a Wasm Service. // [#not-implemented-hide:] pending implementation. message WasmService { diff --git a/generated_api_shadow/BUILD b/generated_api_shadow/BUILD index c570125d0ea94..c2130181a3362 100644 --- a/generated_api_shadow/BUILD +++ b/generated_api_shadow/BUILD @@ -180,7 +180,7 @@ proto_library( "//envoy/extensions/transport_sockets/raw_buffer/v3:pkg", "//envoy/extensions/transport_sockets/tap/v3:pkg", "//envoy/extensions/transport_sockets/tls/v3:pkg", - "//envoy/extensions/wasm/v3alpha:pkg", + "//envoy/extensions/wasm/v3:pkg", "//envoy/service/accesslog/v2:pkg", "//envoy/service/accesslog/v3:pkg", "//envoy/service/auth/v2:pkg", diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto index 84b70cb107bf3..240e571fe2fea 100644 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto @@ -12,7 +12,7 @@ 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.v3alpha"; +option (udpa.annotations.file_migrate).move_to_package = "envoy.extensions.wasm.v3"; // [#protodoc-title: Wasm service] diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD b/generated_api_shadow/envoy/extensions/wasm/v3/BUILD similarity index 100% rename from generated_api_shadow/envoy/extensions/wasm/v3alpha/BUILD rename to generated_api_shadow/envoy/extensions/wasm/v3/BUILD diff --git a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto similarity index 93% rename from generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto rename to generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto index f37b6435b0000..5dd874f25522c 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3alpha/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package envoy.extensions.wasm.v3alpha; +package envoy.extensions.wasm.v3; import "envoy/config/core/v3/base.proto"; @@ -10,7 +10,7 @@ import "udpa/annotations/versioning.proto"; import "validate/validate.proto"; -option java_package = "io.envoyproxy.envoy.extensions.wasm.v3alpha"; +option java_package = "io.envoyproxy.envoy.extensions.wasm.v3"; option java_outer_classname = "WasmProto"; option java_multiple_files = true; @@ -72,7 +72,7 @@ message PluginConfig { } // WasmService is configured as a built-in *envoy.wasm_service* :ref:`ServiceConfig -// `. This opaque configuration will be used to +// `. This opaque configuration will be used to // create a Wasm Service. // [#not-implemented-hide:] pending implementation. message WasmService { From 04302b23e12567a91cc35b5471a1111d48bb329d Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Tue, 21 Jan 2020 18:33:10 +0000 Subject: [PATCH 25/26] Update comments. Signed-off-by: John Plevyak --- api/envoy/config/wasm/v2alpha/wasm.proto | 3 ++- api/envoy/extensions/wasm/v3/wasm.proto | 3 ++- generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto | 3 ++- generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/api/envoy/config/wasm/v2alpha/wasm.proto b/api/envoy/config/wasm/v2alpha/wasm.proto index 240e571fe2fea..34cb704127a34 100644 --- a/api/envoy/config/wasm/v2alpha/wasm.proto +++ b/api/envoy/config/wasm/v2alpha/wasm.proto @@ -37,7 +37,8 @@ message VmConfig { google.protobuf.Any configuration = 4; // Allow the wasm file to include pre-compiled code on VMs which support it. - // This should only be enable for trusted sources as the precompiled code is not verified. + // Warning: this should only be enable for trusted sources as the precompiled code is not + // verified. bool allow_precompiled = 5; } diff --git a/api/envoy/extensions/wasm/v3/wasm.proto b/api/envoy/extensions/wasm/v3/wasm.proto index 5dd874f25522c..ce771727322ec 100644 --- a/api/envoy/extensions/wasm/v3/wasm.proto +++ b/api/envoy/extensions/wasm/v3/wasm.proto @@ -39,7 +39,8 @@ message VmConfig { google.protobuf.Any configuration = 4; // Allow the wasm file to include pre-compiled code on VMs which support it. - // This should only be enable for trusted sources as the precompiled code is not verified. + // Warning: this should only be enable for trusted sources as the precompiled code is not + // verified. bool allow_precompiled = 5; } diff --git a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto index 240e571fe2fea..34cb704127a34 100644 --- a/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto +++ b/generated_api_shadow/envoy/config/wasm/v2alpha/wasm.proto @@ -37,7 +37,8 @@ message VmConfig { google.protobuf.Any configuration = 4; // Allow the wasm file to include pre-compiled code on VMs which support it. - // This should only be enable for trusted sources as the precompiled code is not verified. + // Warning: this should only be enable for trusted sources as the precompiled code is not + // verified. bool allow_precompiled = 5; } diff --git a/generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto b/generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto index 5dd874f25522c..ce771727322ec 100644 --- a/generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto +++ b/generated_api_shadow/envoy/extensions/wasm/v3/wasm.proto @@ -39,7 +39,8 @@ message VmConfig { google.protobuf.Any configuration = 4; // Allow the wasm file to include pre-compiled code on VMs which support it. - // This should only be enable for trusted sources as the precompiled code is not verified. + // Warning: this should only be enable for trusted sources as the precompiled code is not + // verified. bool allow_precompiled = 5; } From 6ad0fa10819644b1c92a12b9079fabcdcae9673f Mon Sep 17 00:00:00 2001 From: John Plevyak Date: Tue, 21 Jan 2020 18:42:48 +0000 Subject: [PATCH 26/26] Address comments. Signed-off-by: John Plevyak --- api/BUILD | 1 - 1 file changed, 1 deletion(-) diff --git a/api/BUILD b/api/BUILD index 37ea6b3984a70..a45caf675b270 100644 --- a/api/BUILD +++ b/api/BUILD @@ -208,7 +208,6 @@ proto_library( "//envoy/extensions/transport_sockets/tap/v3:pkg", "//envoy/extensions/transport_sockets/tls/v3:pkg", "//envoy/extensions/wasm/v3:pkg", - "//envoy/service/accesslog/v2:pkg", "//envoy/service/accesslog/v3:pkg", "//envoy/service/auth/v3:pkg", "//envoy/service/cluster/v3:pkg",