Extension configuration
Each configuration resource in Envoy has a type URL in the typed_config
. This
type corresponds to a versioned schema. The type URL uniquely identifies an
extension capable of interpreting the configuration. The name
field is
optional and can be used as an identifier or as an annotation for the
particular instance of the extension configuration. For example, the following
filter configuration snippet is permitted:
14 - name: front-http-proxy
15 typed_config:
16 "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
17 stat_prefix: ingress_http
18 codec_type: AUTO
19 rds:
20 route_config_name: local_route
21 config_source:
22 resource_api_version: V3
23 api_config_source:
24 api_type: GRPC
25 transport_api_version: V3
26 grpc_services:
27 - envoy_grpc:
28 cluster_name: xds_cluster
29 http_filters:
30 - name: front-router
31 typed_config:
32 "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
33 dynamic_stats: true
In case the control plane lacks the schema definitions for an extension,
xds.type.v3.TypedStruct
should be used as a generic container. The type URL
inside it is then used by a client to convert the contents to a typed
configuration resource. For example, the above example could be written as
follows:
14 - name: front-http-proxy
15 typed_config:
16 "@type": type.googleapis.com/xds.type.v3.TypedStruct
17 type_url: type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
18 value:
19 stat_prefix: ingress_http
20 codec_type: AUTO
21 rds:
22 route_config_name: local_route
23 config_source:
24 resource_api_version: V3
25 api_config_source:
26 api_type: GRPC
27 transport_api_version: V3
28 grpc_services:
29 - envoy_grpc:
30 cluster_name: xds_cluster
31 http_filters:
32 - name: front-router
33 typed_config:
34 "@type": type.googleapis.com/xds.type.v3.TypedStruct
35 type_url: type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
36 value:
37 dynamic_stats: true
Discovery service
Extension configuration can be supplied dynamically from an xDS management server using ExtensionConfiguration discovery service. The name field in the extension configuration acts as the resource identifier.
HTTP filters
For HTTP filters, HTTP connection manager supports dynamic filter re-configuration.
HTTP filter extension config discovery service has a statistics tree rooted at extension_config_discovery.<stat_prefix>.<extension_config_name>. For HTTP filters, the value of <stat_prefix> is http_filter. In addition to the common subscription statistics, it also provides the following:
Name |
Type |
Description |
---|---|---|
config_reload |
Counter |
Total number of successful configuration updates |
config_fail |
Counter |
Total number of failed configuration updates |
config_conflict |
Counter |
Total number of conflicting applications of configuration updates; this may happen when a new listener cannot reuse a subscribed extension configuration due to an invalid type URL. |
Listener filters
For Listener filters, the discovery service configuration is: dynamic listener filter re-configuration. The dynamic listener filter config is only supported in TCP listeners. If the dynamic config is missing, the connection will be rejected until a valid config is updated.
Listener filter extension config discovery service has a statistics tree rooted at listener.<address>. (or listener.<stat_prefix>. if stat_prefix is non-empty) with the following statistics:
Name |
Type |
Description |
---|---|---|
extension_config_missing |
Counter |
Total connections closed due to missing listener filter extension configuration |