|
| 1 | +{{- if .Values.deployment.create }} |
| 2 | +apiVersion: v1 |
| 3 | +kind: ConfigMap |
| 4 | +metadata: |
| 5 | + name: metadata-envoy-configmap |
| 6 | + labels: |
| 7 | + component: metadata-envoy |
| 8 | +{{ include "pipelines.commonLabels" . | indent 4 }} |
| 9 | +data: |
| 10 | + envoy-config.yaml: |- |
| 11 | + admin: |
| 12 | + access_log: |
| 13 | + name: admin_access |
| 14 | + typed_config: |
| 15 | + "@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog |
| 16 | + path: /tmp/admin_access.log |
| 17 | + address: |
| 18 | + socket_address: { address: 0.0.0.0, port_value: 9901 } |
| 19 | +
|
| 20 | + static_resources: |
| 21 | + listeners: |
| 22 | + - name: listener_0 |
| 23 | + address: |
| 24 | + socket_address: { address: 0.0.0.0, port_value: 9090 } |
| 25 | + filter_chains: |
| 26 | + - filters: |
| 27 | + - name: envoy.filters.network.http_connection_manager |
| 28 | + typed_config: |
| 29 | + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager |
| 30 | + codec_type: auto |
| 31 | + stat_prefix: ingress_http |
| 32 | + route_config: |
| 33 | + name: local_route |
| 34 | + virtual_hosts: |
| 35 | + - name: local_service |
| 36 | + domains: [ "*" ] |
| 37 | + routes: |
| 38 | + - match: { prefix: "/" } |
| 39 | + route: |
| 40 | + cluster: metadata-cluster |
| 41 | + max_stream_duration: |
| 42 | + grpc_timeout_header_max: '0s' |
| 43 | + typed_per_filter_config: |
| 44 | + envoy.filter.http.cors: |
| 45 | + "@type": type.googleapis.com/envoy.extensions.filters.http.cors.v3.CorsPolicy |
| 46 | + allow_origin_string_match: |
| 47 | + - safe_regex: |
| 48 | + regex: ".*" |
| 49 | + allow_methods: GET, PUT, DELETE, POST, OPTIONS |
| 50 | + allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout |
| 51 | + max_age: "1728000" |
| 52 | + expose_headers: custom-header-1,grpc-status,grpc-message |
| 53 | + http_filters: |
| 54 | + - name: envoy.filters.http.grpc_web |
| 55 | + typed_config: |
| 56 | + "@type": type.googleapis.com/envoy.extensions.filters.http.grpc_web.v3.GrpcWeb |
| 57 | + - name: envoy.filters.http.cors |
| 58 | + typed_config: |
| 59 | + "@type": type.googleapis.com/envoy.extensions.filters.http.cors.v3.Cors |
| 60 | + - name: envoy.filters.http.router |
| 61 | + typed_config: |
| 62 | + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router |
| 63 | + clusters: |
| 64 | + - name: metadata-cluster |
| 65 | + connect_timeout: 30.0s |
| 66 | + type: logical_dns |
| 67 | + typed_extension_protocol_options: |
| 68 | + envoy.extensions.upstreams.http.v3.HttpProtocolOptions: |
| 69 | + "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions |
| 70 | + explicit_http_config: |
| 71 | + http2_protocol_options: { } |
| 72 | + lb_policy: round_robin |
| 73 | + load_assignment: |
| 74 | + cluster_name: metadata-grpc |
| 75 | + endpoints: |
| 76 | + - lb_endpoints: |
| 77 | + - endpoint: |
| 78 | + address: |
| 79 | + socket_address: |
| 80 | + address: metadata-grpc-service |
| 81 | + port_value: 8080 |
| 82 | +{{- end }} |
0 commit comments