diff --git a/BUILD b/BUILD index 3a16b3e3..c8d845c6 100644 --- a/BUILD +++ b/BUILD @@ -28,6 +28,7 @@ proto_library( "//envoy/config/filter/dubbo/router/v2alpha1:pkg", "//envoy/config/filter/fault/v2:pkg", "//envoy/config/filter/http/adaptive_concurrency/v2alpha:pkg", + "//envoy/config/filter/http/aws_lambda/v2alpha:pkg", "//envoy/config/filter/http/aws_request_signing/v2alpha:pkg", "//envoy/config/filter/http/buffer/v2:pkg", "//envoy/config/filter/http/cache/v2alpha:pkg", @@ -160,6 +161,7 @@ proto_library( "//envoy/extensions/common/tap/v3:pkg", "//envoy/extensions/filters/common/fault/v3:pkg", "//envoy/extensions/filters/http/adaptive_concurrency/v3:pkg", + "//envoy/extensions/filters/http/aws_lambda/v3:pkg", "//envoy/extensions/filters/http/aws_request_signing/v3:pkg", "//envoy/extensions/filters/http/buffer/v3:pkg", "//envoy/extensions/filters/http/cache/v3alpha:pkg", diff --git a/docs/BUILD b/docs/BUILD index 222890e8..1a791f14 100644 --- a/docs/BUILD +++ b/docs/BUILD @@ -34,6 +34,7 @@ proto_library( "//envoy/config/filter/dubbo/router/v2alpha1:pkg", "//envoy/config/filter/fault/v2:pkg", "//envoy/config/filter/http/adaptive_concurrency/v2alpha:pkg", + "//envoy/config/filter/http/aws_lambda/v2alpha:pkg", "//envoy/config/filter/http/aws_request_signing/v2alpha:pkg", "//envoy/config/filter/http/buffer/v2:pkg", "//envoy/config/filter/http/cache/v2alpha:pkg", diff --git a/envoy/config/filter/http/aws_lambda/v2alpha/BUILD b/envoy/config/filter/http/aws_lambda/v2alpha/BUILD new file mode 100644 index 00000000..ef3541eb --- /dev/null +++ b/envoy/config/filter/http/aws_lambda/v2alpha/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 = ["@com_github_cncf_udpa//udpa/annotations:pkg"], +) diff --git a/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto b/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto new file mode 100644 index 00000000..cd9e1d30 --- /dev/null +++ b/envoy/config/filter/http/aws_lambda/v2alpha/aws_lambda.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package envoy.config.filter.http.aws_lambda.v2alpha; + +import "udpa/annotations/status.proto"; + +import "udpa/annotations/migrate.proto"; +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.config.filter.http.aws_lambda.v2alpha"; +option java_outer_classname = "AwsLambdaProto"; +option java_multiple_files = true; +option (udpa.annotations.file_migrate).move_to_package = + "envoy.extensions.filters.http.aws_lambda.v3"; +option (udpa.annotations.file_status).work_in_progress = true; + +// [#protodoc-title: AWS Lambda] +// AWS Lambda :ref:`configuration overview `. +// [#extension: envoy.filters.http.aws_lambda] + +// AWS Lambda filter config +message Config { + // The ARN of the AWS Lambda to invoke when the filter is engaged + // Must be in the following format: + // arn::lambda:::function: + string arn = 1 [(validate.rules).string = {min_len: 1}]; + + // Whether to transform the request (headers and body) to a JSON payload or pass it as is. + bool payload_passthrough = 2; +} + +// Per-route configuration for AWS Lambda. This can be useful when invoking a different Lambda function or a different +// version of the same Lambda depending on the route. +message PerRouteConfig { + Config invoke_config = 1; +} diff --git a/envoy/extensions/filters/http/aws_lambda/v3/BUILD b/envoy/extensions/filters/http/aws_lambda/v3/BUILD new file mode 100644 index 00000000..00c14313 --- /dev/null +++ b/envoy/extensions/filters/http/aws_lambda/v3/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/config/filter/http/aws_lambda/v2alpha:pkg", + "@com_github_cncf_udpa//udpa/annotations:pkg", + ], +) diff --git a/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto b/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto new file mode 100644 index 00000000..f41639d9 --- /dev/null +++ b/envoy/extensions/filters/http/aws_lambda/v3/aws_lambda.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; + +package envoy.extensions.filters.http.aws_lambda.v3; + +import "udpa/annotations/versioning.proto"; + +import "validate/validate.proto"; + +option java_package = "io.envoyproxy.envoy.extensions.filters.http.aws_lambda.v3"; +option java_outer_classname = "AwsLambdaProto"; +option java_multiple_files = true; + +// [#protodoc-title: AWS Lambda] +// AWS Lambda :ref:`configuration overview `. +// [#extension: envoy.filters.http.aws_lambda] + +// AWS Lambda filter config +message Config { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.filter.http.aws_lambda.v2alpha.Config"; + + // The ARN of the AWS Lambda to invoke when the filter is engaged + // Must be in the following format: + // arn::lambda:::function: + string arn = 1 [(validate.rules).string = {min_len: 1}]; + + // Whether to transform the request (headers and body) to a JSON payload or pass it as is. + bool payload_passthrough = 2; +} + +// Per-route configuration for AWS Lambda. This can be useful when invoking a different Lambda function or a different +// version of the same Lambda depending on the route. +message PerRouteConfig { + option (udpa.annotations.versioning).previous_message_type = + "envoy.config.filter.http.aws_lambda.v2alpha.PerRouteConfig"; + + Config invoke_config = 1; +}