|
| 1 | +# Envoy proxy configuration template for envoy-sidecar mode. |
| 2 | +# The operator copies this to agent namespaces via ensureNamespaceConfigMaps. |
| 3 | +apiVersion: v1 |
| 4 | +kind: ConfigMap |
| 5 | +metadata: |
| 6 | + name: envoy-config |
| 7 | + namespace: kagenti-operator-system |
| 8 | + labels: |
| 9 | + app.kubernetes.io/name: kagenti-operator |
| 10 | + app.kubernetes.io/component: authbridge |
| 11 | + app.kubernetes.io/managed-by: kustomize |
| 12 | +data: |
| 13 | + envoy.yaml: | |
| 14 | + admin: |
| 15 | + address: |
| 16 | + socket_address: |
| 17 | + protocol: TCP |
| 18 | + address: 127.0.0.1 |
| 19 | + port_value: 9901 |
| 20 | +
|
| 21 | + static_resources: |
| 22 | + listeners: |
| 23 | + - name: outbound_listener |
| 24 | + address: |
| 25 | + socket_address: |
| 26 | + protocol: TCP |
| 27 | + address: 0.0.0.0 |
| 28 | + port_value: 15123 |
| 29 | + listener_filters: |
| 30 | + - name: envoy.filters.listener.original_dst |
| 31 | + typed_config: |
| 32 | + "@type": type.googleapis.com/envoy.extensions.filters.listener.original_dst.v3.OriginalDst |
| 33 | + - name: envoy.filters.listener.tls_inspector |
| 34 | + typed_config: |
| 35 | + "@type": type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector |
| 36 | + filter_chains: |
| 37 | + - filter_chain_match: |
| 38 | + transport_protocol: tls |
| 39 | + filters: |
| 40 | + - name: envoy.filters.network.tcp_proxy |
| 41 | + typed_config: |
| 42 | + "@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy |
| 43 | + stat_prefix: outbound_tls_passthrough |
| 44 | + cluster: original_destination |
| 45 | + - filter_chain_match: |
| 46 | + transport_protocol: raw_buffer |
| 47 | + filters: |
| 48 | + - name: envoy.filters.network.http_connection_manager |
| 49 | + typed_config: |
| 50 | + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager |
| 51 | + stat_prefix: outbound_http |
| 52 | + codec_type: AUTO |
| 53 | + route_config: |
| 54 | + name: outbound_routes |
| 55 | + virtual_hosts: |
| 56 | + - name: catch_all |
| 57 | + domains: ["*"] |
| 58 | + routes: |
| 59 | + - match: |
| 60 | + prefix: "/" |
| 61 | + route: |
| 62 | + cluster: original_destination |
| 63 | + timeout: 300s |
| 64 | + http_filters: |
| 65 | + - name: envoy.filters.http.ext_proc |
| 66 | + typed_config: |
| 67 | + "@type": type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor |
| 68 | + grpc_service: |
| 69 | + envoy_grpc: |
| 70 | + cluster_name: ext_proc_cluster |
| 71 | + timeout: 300s |
| 72 | + allow_mode_override: true |
| 73 | + processing_mode: |
| 74 | + request_header_mode: SEND |
| 75 | + response_header_mode: SEND |
| 76 | + request_body_mode: NONE |
| 77 | + response_body_mode: NONE |
| 78 | + - name: envoy.filters.http.router |
| 79 | + typed_config: |
| 80 | + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router |
| 81 | +
|
| 82 | + - name: inbound_listener |
| 83 | + address: |
| 84 | + socket_address: |
| 85 | + protocol: TCP |
| 86 | + address: 0.0.0.0 |
| 87 | + port_value: 15124 |
| 88 | + listener_filters: |
| 89 | + - name: envoy.filters.listener.original_dst |
| 90 | + typed_config: |
| 91 | + "@type": type.googleapis.com/envoy.extensions.filters.listener.original_dst.v3.OriginalDst |
| 92 | + filter_chains: |
| 93 | + - filters: |
| 94 | + - name: envoy.filters.network.http_connection_manager |
| 95 | + typed_config: |
| 96 | + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager |
| 97 | + stat_prefix: inbound_http |
| 98 | + codec_type: AUTO |
| 99 | + route_config: |
| 100 | + name: inbound_routes |
| 101 | + virtual_hosts: |
| 102 | + - name: local_app |
| 103 | + domains: ["*"] |
| 104 | + routes: |
| 105 | + - match: |
| 106 | + prefix: "/" |
| 107 | + route: |
| 108 | + cluster: original_destination |
| 109 | + timeout: 300s |
| 110 | + http_filters: |
| 111 | + - name: envoy.filters.http.lua |
| 112 | + typed_config: |
| 113 | + "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua |
| 114 | + inline_code: | |
| 115 | + function envoy_on_request(request_handle) |
| 116 | + request_handle:headers():add("x-authbridge-direction", "inbound") |
| 117 | + end |
| 118 | + - name: envoy.filters.http.ext_proc |
| 119 | + typed_config: |
| 120 | + "@type": type.googleapis.com/envoy.extensions.filters.http.ext_proc.v3.ExternalProcessor |
| 121 | + grpc_service: |
| 122 | + envoy_grpc: |
| 123 | + cluster_name: ext_proc_cluster |
| 124 | + timeout: 300s |
| 125 | + allow_mode_override: true |
| 126 | + processing_mode: |
| 127 | + request_header_mode: SEND |
| 128 | + response_header_mode: SEND |
| 129 | + request_body_mode: NONE |
| 130 | + response_body_mode: NONE |
| 131 | + - name: envoy.filters.http.router |
| 132 | + typed_config: |
| 133 | + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router |
| 134 | +
|
| 135 | + clusters: |
| 136 | + - name: original_destination |
| 137 | + connect_timeout: 30s |
| 138 | + type: ORIGINAL_DST |
| 139 | + lb_policy: CLUSTER_PROVIDED |
| 140 | + original_dst_lb_config: |
| 141 | + use_http_header: false |
| 142 | +
|
| 143 | + - name: ext_proc_cluster |
| 144 | + connect_timeout: 5s |
| 145 | + type: STATIC |
| 146 | + lb_policy: ROUND_ROBIN |
| 147 | + http2_protocol_options: {} |
| 148 | + load_assignment: |
| 149 | + cluster_name: ext_proc_cluster |
| 150 | + endpoints: |
| 151 | + - lb_endpoints: |
| 152 | + - endpoint: |
| 153 | + address: |
| 154 | + socket_address: |
| 155 | + address: 127.0.0.1 |
| 156 | + port_value: 9090 |
0 commit comments