Advertisement
akumor

envoy.yaml

Nov 15th, 2018
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.93 KB | None | 0 0
  1. static_resources:
  2.   listeners:
  3.   - name: "127.0.0.1"
  4.     address:
  5.       socket_address:
  6.         address: "0.0.0.0"
  7.         protocol: TCP
  8.         port_value: 9902
  9.     filter_chains:
  10.     - filters:
  11.       - name: envoy.http_connection_manager
  12.         config:
  13.           codec_type: AUTO
  14.           idle_timeout: 840s
  15.           stat_prefix: egress_dynamodb_iad
  16.           #update access_logs here
  17.           route_config:
  18.             virtual_hosts:
  19.             - name: egress_dynamodb_iad
  20.               domains:
  21.              - "*"
  22.               routes:
  23.               - match:
  24.                   prefix: "/"
  25.                 route:
  26.                   cluster: egress_dynamodb_iad
  27.                   retry_policy:
  28.                     retry_on: connect-failure
  29.           http_filters:
  30.           - name: envoy.http_dynamo_filter
  31.             config: {}
  32.           - name: envoy.router
  33.             config: {}
  34.           access_log:
  35.           - name: envoy.file_access_log
  36.             filter:
  37.               or_filter:
  38.                 filters:
  39.                   - status_code_filter:
  40.                       comparison:
  41.                         op: GE
  42.                         value:
  43.                           default_value: 400
  44.                           runtime_key: access_log.access_error.status
  45.                   - status_code_filter:
  46.                       comparison:
  47.                         op: EQ
  48.                         value:
  49.                           default_value: 0
  50.                           runtime_key: access_log.access_error.status
  51.                   - duration_filter:
  52.                       comparison:
  53.                         op: GE
  54.                         value:
  55.                           default_value: 2000
  56.                           runtime_key: access_log.access_error.duration
  57.             config:
  58.               path: "/var/log/envoy/egress_dynamodb_iad_http_error.log"
  59.               format: "[%START_TIME%] \"%REQ(:METHOD)% %REQ(X-ENVOY-ORIGINAL-PATH?:PATH):256% %PROTOCOL%\" %RESPONSE_CODE% %RESPONSE_FLAGS% %BYTES_RECEIVED% %BYTES_SENT% %DURATION% %RESP(X-ENVOY-UPSTREAM-SERVICE-TIME)% \"%REQ(X-FORWARDED-FOR)%\" \"%REQ(USER-AGENT)%\" \"%REQ(X-REQUEST-ID)%\" \"%REQ(:AUTHORITY)%\" \"%UPSTREAM_HOST%\" \"%RESP(X-AMZN-RequestId)%\"\n"
  60.      
  61.   clusters:
  62.   - name: egress_dynamodb_iad
  63.     tls_context:
  64.       common_tls_context:
  65.         validation_context:
  66.           trusted_ca:
  67.             filename: certs/cacert.pem
  68.           verify_subject_alt_name: "['dynamodb.us-east-1.amazonaws.com']"
  69.     connect_timeout: 1s
  70.     type: LOGICAL_DNS
  71.     lb_policy: ROUND_ROBIN
  72.     hosts:
  73.     - socket_address:
  74.         address: dynamodb.us-east-1.amazonaws.com
  75.         port_value: 443
  76.         protocol: TCP
  77.  
  78. cluster_manager: {}
  79. flags_path: "/etc/envoy/flags"
  80. watchdog: {}
  81.  
  82. admin:
  83.   access_log_path: /var/log/envoy/admin_access.log
  84.   address:
  85.     socket_address:
  86.       protocol: TCP
  87.       address: 0.0.0.0
  88.       port_value: 9901
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement