Extension configuration

Each configuration resource in Envoy has a type URL in the typed_config. This type corresponds to a versioned schema. If the type URL uniquely identifies an extension capable of interpreting the configuration, then the extension is selected regardless of the name field. In this case the name field becomes 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:

  1. name: front-http-proxy
  2. typed_config:
  3. "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
  4. stat_prefix: ingress_http
  5. codec_type: AUTO
  6. rds:
  7. route_config_name: local_route
  8. config_source:
  9. api_config_source:
  10. api_type: GRPC
  11. grpc_services:
  12. envoy_grpc:
  13. cluster_name: xds_cluster
  14. http_filters:
  15. - name: front-router
  16. typed_config:
  17. "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
  18. dynamic_stats: true

In case the control plane lacks the schema definitions for an extension, udpa.type.v1.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:

  1. name: front-http-proxy
  2. typed_config:
  3. "@type": type.googleapis.com/udpa.type.v1.TypedStruct
  4. type_url: type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
  5. value:
  6. stat_prefix: ingress_http
  7. codec_type: AUTO
  8. rds:
  9. route_config_name: local_route
  10. config_source:
  11. api_config_source:
  12. api_type: GRPC
  13. grpc_services:
  14. envoy_grpc:
  15. cluster_name: xds_cluster
  16. http_filters:
  17. - name: front-router
  18. typed_config:
  19. "@type": type.googleapis.com/udpa.type.v1.TypedStruct
  20. type_url: type.googleapis.com/envoy.extensions.filters.http.router.v3Router

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. For example, HTTP connection manager supports dynamic filter re-configuration for HTTP filters.

Extension config discovery service has a statistics tree rooted at <stat_prefix>.extension_config_discovery.<extension_config_name>. 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