From 55b942ae48e46e91625efb4abf43713e2c19dc73 Mon Sep 17 00:00:00 2001 From: zirain Date: Fri, 22 Dec 2023 14:44:51 +0800 Subject: [PATCH] improvement CEL doc (#31487) * improvement CEL formatter doc Signed-off-by: zirain * more page Signed-off-by: zirain * lint Signed-off-by: zirain --------- Signed-off-by: zirain --- .../extensions/access_loggers/filters/cel/v3/cel.proto | 5 +++-- api/envoy/extensions/formatter/cel/v3/cel.proto | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/api/envoy/extensions/access_loggers/filters/cel/v3/cel.proto b/api/envoy/extensions/access_loggers/filters/cel/v3/cel.proto index d8ef21a1cdf1..750ffd30d251 100644 --- a/api/envoy/extensions/access_loggers/filters/cel/v3/cel.proto +++ b/api/envoy/extensions/access_loggers/filters/cel/v3/cel.proto @@ -21,7 +21,8 @@ message ExpressionFilter { // Expressions are based on the set of Envoy :ref:`attributes `. // The provided expression must evaluate to true for logging (expression errors are considered false). // Examples: - // - ``response.code >= 400`` - // - ``(connection.mtls && request.headers['x-log-mtls'] == 'true') || request.url_path.contains('v1beta3')`` + // + // * ``response.code >= 400`` + // * ``(connection.mtls && request.headers['x-log-mtls'] == 'true') || request.url_path.contains('v1beta3')`` string expression = 1; } diff --git a/api/envoy/extensions/formatter/cel/v3/cel.proto b/api/envoy/extensions/formatter/cel/v3/cel.proto index ca9d01dedb4d..4e19fa5db954 100644 --- a/api/envoy/extensions/formatter/cel/v3/cel.proto +++ b/api/envoy/extensions/formatter/cel/v3/cel.proto @@ -24,10 +24,11 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE; // truncation up to Z characters long. // // Examples: -// - ``%CEL(response.code)%`` -// - ``%CEL(connection.mtls)%`` -// - ``%CEL(request.headers['x-envoy-original-path']):10%`` -// - ``%CEL(request.headers['x-log-mtls'] || request.url_path.contains('v1beta3'))%`` +// +// * ``%CEL(response.code)%`` +// * ``%CEL(connection.mtls)%`` +// * ``%CEL(request.headers['x-envoy-original-path']):10%`` +// * ``%CEL(request.headers['x-log-mtls'] || request.url_path.contains('v1beta3'))%`` // Configuration for the CEL formatter. message Cel {