Guest User

Untitled

a guest
Sep 10th, 2020
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.92 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.              # README: Check the note below
  35.               # # # #
  36.               # # This section redirects incoming /api/etc/ to /etc
  37.               # - match:
  38.               #     prefix: "/api/"
  39.               #   route:
  40.               #     prefix_rewrite: "/"
  41.               #     cluster: service_backend
  42.               # # This section redirects all incoming /api to /
  43.               # - match:
  44.               #     prefix: "/api"
  45.               #   route:
  46.               #     prefix_rewrite: "/"
  47.               #     cluster: service_backend
  48.               # # # #
  49.               - match:
  50.                   prefix: "/"
  51.                 route:
  52.                   cluster: service_frontend
  53.           http_filters:
  54.           - name: envoy.filters.http.router
  55.   clusters:
  56.   - name: service_frontend
  57.     connect_timeout: 0.25s
  58.     type: LOGICAL_DNS
  59.     dns_lookup_family: V4_ONLY
  60.     lb_policy: ROUND_ROBIN
  61.     load_assignment:
  62.       cluster_name: service_frontend
  63.       endpoints:
  64.       - lb_endpoints:
  65.         - endpoint:
  66.             address:
  67.               socket_address:
  68.                 address: rebhu-front
  69.                 port_value: 3000
  70.   # README: Check the note below
  71.   # # # #
  72.   # - name: service_backend
  73.   #   connect_timeout: 0.25s
  74.   #   type: LOGICAL_DNS
  75.   #   dns_lookup_family: V4_ONLY
  76.   #   lb_policy: ROUND_ROBIN
  77.   #   load_assignment:
  78.   #     cluster_name: service_backend
  79.   #     endpoints:
  80.   #     - lb_endpoints:
  81.   #       - endpoint:
  82.   #           address:
  83.   #             socket_address:
  84.   #               address: rebhu-back
  85.   #               port_value: 4000
  86.   # # # #
  87.  
  88.   ## NOTE:
  89.   # The section marked with "# README: Check the note below"
  90.   # has been commented to simplify this Envoy configuration.
  91.   # Please feel free to uncomment the sections.
Add Comment
Please, Sign In to add comment