diff --git a/Makefile.core.mk b/Makefile.core.mk index d4955af1998..6ddb0f06416 100644 --- a/Makefile.core.mk +++ b/Makefile.core.mk @@ -111,6 +111,10 @@ check_wasm: build_wasm build_envoy clean: @bazel clean +.PHONY: gen-extensions-doc +gen-extensions-doc: + buf generate --path extensions/ + gen: @scripts/gen-testdata.sh diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 00000000000..70e8095de5d --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,8 @@ +# buf.gen.yaml sets up the generation configuration for all of our plugins. +# Note: buf does not allow multi roots that are within each other; as a result, the common-protos folders are +# symlinked into the top level directory. +version: v1 +plugins: +- name: docs + out: . + opt: warnings=false,per_file=true,mode=html_fragment_with_front_matter diff --git a/extensions/access_log_policy/config/v1alpha1/access_log_policy_config.pb.html b/extensions/access_log_policy/config/v1alpha1/access_log_policy_config.pb.html index a3be641c7ca..ca506b80d59 100644 --- a/extensions/access_log_policy/config/v1alpha1/access_log_policy_config.pb.html +++ b/extensions/access_log_policy/config/v1alpha1/access_log_policy_config.pb.html @@ -8,14 +8,16 @@ number_of_entries: 1 ---
Accesslog Policy plugin is a stateful http log sampler. -It decides whether a request is logged based on the following rules. - 1. All requests resulting in errors are logged. - 2. First successful request within logwindowduration from a specific - source ip (source principal) is logged. -The plugin records its decision in the istio.accesslogpolicy attribute with +It decides whether a request is logged based on the following rules.
+log_window_durationlogWindowDurationDurationOptional. Allows specifying logging window for successful requests. @@ -44,7 +46,7 @@
max_client_cache_sizemaxClientCacheSizeint32Optional. Allows specifying max client cache size. diff --git a/extensions/attributegen/config.pb.html b/extensions/attributegen/config.pb.html index 961bc4141f5..7f9ab99e8d2 100644 --- a/extensions/attributegen/config.pb.html +++ b/extensions/attributegen/config.pb.html @@ -8,15 +8,13 @@ weight: 20 number_of_entries: 3 --- -
AttributeGen plugin uses builtin attributes +
AttributeGen plugin uses builtin +attributes as inputs and produces new attributes that can be used by downstream plugins.
-The following is an example of a configuration that produces one attribute
named istio_operationId using request.url_path and request.method.
{{
{
"attributes": [
{
@@ -44,20 +42,15 @@
}
-
{{}} {{}}
-If the Stats plugin runs after AttributeGen, it can use istio_operationId
to populate a dimension on a metric.
The following is an example of response codes being mapped into a smaller
number of response classes as the istio_responseClass attribute. For
example, all response codes in 200s are mapped to 2xx.
{{
{
"attributes": [
{
@@ -97,11 +90,9 @@
}
-
{{}} {{}}
- -If multiple AttributeGene configurations produce the same attribute, the +
If multiple AttributeGen configurations produce the same attribute, the result of the last configuration will be visible to downstream filters.
output_attributeoutputAttributestringThe name of the attribute that is populated on a successful match.
An attribute name SHOULD NOT contain a .. You may use underscores for
namespacing instead.
Example: istio_operationId
istio_ attribute namespace is reserved by Istio.
AttributeGeneration may fail to evaluate when an attribute is not
available. For example, response.code may not be available when a request
ends abruptly. When attribute generation fails, it will not populate the
attribute.
If the generated attribute is used by an authz plugin, it should account
for the possibility that the attribute may be missing. Use
has(attribute_name) function to check for presence of an attribute before
using its value, and provide appropriate defaults. For example the
following is a safe use of response.code
has(response.code)?response.code:200
The condition is a CEL expression -that may use builtin attributes.
- +that may use builtin +attributes.Example:
-{{
{
"value": "GetBook",
"condition":
@@ -240,23 +224,17 @@ Match
&& request.method == 'GET'"
},
-
Note: CEL uses re2 regex
library. Use anchors {^, $} to ensure that the regex evaluates
efficiently.
Note: request.url_path is normalized and stripped of query params.
a Read only operation on books
-{ "value": "ReadOnlyBooks",
"condition": "request.url_path.startsWith('/books/') &&
in(request.method, ['GET', 'HEAD'])"}
-
{{}} {{}}
-An empty condition evaluates to true and should be used to provide a
default value.
max_peer_cache_sizemaxPeerCacheSizeUInt32Valuemaximum size of the peer metadata cache. @@ -38,7 +38,6 @@
Wrapper message for uint32.
The JSON representation for UInt32Value is JSON number.