# envoy demo with golang extension enabled
static_resources:
  listeners:
  - name: listener_0
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 10001
    filter_chains:
    - filters:
      - name: envoy.filters.network.http_connection_manager
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
          stat_prefix: ingress_http
          http_filters:
          - name: envoy.filters.http.router
            typed_config:
              "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
          route_config:
            name: local_route
            virtual_hosts:
            - name: local_service
              domains: ["*"]
              routes:
              - match:
                  prefix: "/mytest.service"
                route:
                  cluster: local_service

  clusters:
  - name: local_service
    connect_timeout: 5s
    type: strict_dns
    lb_policy: round_robin
    upstream_config:
      name: envoy.upstreams.http.tcp.golang
      typed_config:
        "@type": type.googleapis.com/envoy.extensions.upstreams.http.tcp.golang.v3alpha.Config
        library_id: my-configurable-bridge-id
        library_path: "lib/my_configurable_bridge.so"
        plugin_name: my_configurable_bridge
        plugin_config:
          "@type": type.googleapis.com/xds.type.v3.TypedStruct
          value:
            foo: "bar"
    load_assignment:
      cluster_name: local_service
      endpoints:
      - lb_endpoints:
        - endpoint:
            address:
              socket_address:
                address: host.docker.internal
                port_value: 20880

admin:
  access_log_path: /dev/null
  address:
    socket_address:
      address: 0.0.0.0
      port_value: 9902
