Guest User

Untitled

a guest
Sep 10th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.55 KB | None | 0 0
  1. # Configuration for administrative purposes
  2. admin:
  3.   access_log_path: /tmp/admin_access.log
  4.   address:
  5.     socket_address:
  6.       protocol: TCP
  7.       address: 127.0.0.1
  8.       port_value: 9901
  9. static_resources:
  10.   listeners:
  11.  # Configure a listener to accept all incoming TCP connections at port 10000
  12.   - name: listener_10000
  13.     address:
  14.       socket_address:
  15.         protocol: TCP
  16.         address: 0.0.0.0
  17.         port_value: 10000
  18.     # Describe the connection details that are being accepted
  19.     filter_chains:
  20.     - filters:
  21.      # Notify Envoy to only accept TCP connections of type HTTP at this listener
  22.       - name: envoy.filters.network.http_connection_manager
  23.         typed_config:
  24.           "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
  25.           # Define a prefix for identifying in logs
  26.           stat_prefix: ingress_http
  27.           # Define details of the route that points at the desired resource
  28.           route_config:
  29.             name: local_route
  30.             virtual_hosts:
  31.             - name: local_service
  32.               domains: ["*"]
  33.               routes:
  34.              # This section redirects incoming /api/etc/ to /etc
  35.               - match:
  36.                   prefix: "/api/"
  37.                 route:
  38.                   prefix_rewrite: "/"
  39.                   cluster: service_backend
  40.               # This section redirects all incoming /api to /
  41.               - match:
  42.                   prefix: "/api"
  43.                 route:
  44.                   prefix_rewrite: "/"
  45.                   cluster: service_backend
  46.               - match:
  47.                   prefix: "/"
  48.                 route:
  49.                   cluster: service_frontend
  50.           http_filters:
  51.           - name: envoy.filters.http.router
  52.   clusters:
  53.   - name: service_frontend
  54.     connect_timeout: 0.25s
  55.     type: LOGICAL_DNS
  56.     dns_lookup_family: V4_ONLY
  57.     lb_policy: ROUND_ROBIN
  58.     load_assignment:
  59.       cluster_name: service_frontend
  60.       endpoints:
  61.       - lb_endpoints:
  62.         - endpoint:
  63.             address:
  64.               socket_address:
  65.                 address: rebhu-front
  66.                 port_value: 3000
  67.   - name: service_backend
  68.     connect_timeout: 0.25s
  69.     type: LOGICAL_DNS
  70.     dns_lookup_family: V4_ONLY
  71.     lb_policy: ROUND_ROBIN
  72.     load_assignment:
  73.       cluster_name: service_backend
  74.       endpoints:
  75.       - lb_endpoints:
  76.         - endpoint:
  77.             address:
  78.               socket_address:
  79.                 address: rebhu-back
  80.                 port_value: 4000
Add Comment
Please, Sign In to add comment