Browse Source

Fixes to enoyroute

pull/1857/head
Nish Anil 3 years ago
parent
commit
077538d05c
3 changed files with 56 additions and 47 deletions
  1. +51
    -43
      deploy/k8s/helm/apigwws/envoy.yaml
  2. +1
    -1
      deploy/k8s/helm/apigwws/templates/ingress.yaml
  3. +4
    -3
      deploy/k8s/helm/apigwws/values.yaml

+ 51
- 43
deploy/k8s/helm/apigwws/envoy.yaml View File

@ -12,16 +12,17 @@ static_resources:
port_value: 80
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
codec_type: auto
- name: envoy.filters.network.http_connection_manager
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http
codec_type: AUTO
route_config:
name: eshop_backend_route
virtual_hosts:
- name: eshop_backend
domains:
- "*"
- ["*"]
routes:
- name: "c-short"
match:
@ -80,63 +81,70 @@ static_resources:
prefix_rewrite: "/"
cluster: shoppingagg
http_filters:
- name: envoy.router
access_log:
- name: envoy.file_access_log
filter:
not_health_check_filter: {}
config:
json_format:
time: "%START_TIME%"
protocol: "%PROTOCOL%"
duration: "%DURATION%"
request_method: "%REQ(:METHOD)%"
request_host: "%REQ(HOST)%"
path: "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%"
response_flags: "%RESPONSE_FLAGS%"
route_name: "%ROUTE_NAME%"
upstream_host: "%UPSTREAM_HOST%"
upstream_cluster: "%UPSTREAM_CLUSTER%"
upstream_local_address: "%UPSTREAM_LOCAL_ADDRESS%"
path: "/tmp/access.log"
- name: envoy.filters.http.router
clusters:
- name: shoppingagg
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: webshoppingagg
port_value: 80
load_assignment:
cluster_name: shoppingagg
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: webshoppingagg
port_value: 80
- name: catalog
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: catalog-api
port_value: 80
load_assignment:
cluster_name: catalog
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: catalog-api
port_value: 80
- name: basket
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: basket-api
port_value: 80
load_assignment:
cluster_name: basket
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: basket-api
port_value: 80
- name: ordering
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-api
port_value: 80
load_assignment:
cluster_name: ordering
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: ordering-api
port_value: 80
- name: signalr-hub
connect_timeout: 0.25s
type: strict_dns
lb_policy: round_robin
hosts:
- socket_address:
address: ordering-signalrhub
port_value: 80
load_assignment:
cluster_name: signalr-hub
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: ordering-signalrhub
port_value: 80

+ 1
- 1
deploy/k8s/helm/apigwws/templates/ingress.yaml View File

@ -38,7 +38,7 @@ spec:
- host: {{ . }}
http:
paths:
- path: {{ $ingressPath }}
- path: {{ $ingressPath }}(/|$)(.*)
pathType: Prefix
backend:
service:


+ 4
- 3
deploy/k8s/helm/apigwws/values.yaml View File

@ -4,7 +4,7 @@ pathBase: /webshoppingapigw
image:
repository: envoyproxy/envoy
tag: v1.11.1
tag: v1.21.0
service:
type: ClusterIP
@ -14,8 +14,9 @@ service:
ingress:
enabled: true
annotations:
nginx.ingress.kubernetes.io/rewrite-target: "/"
ingress.kubernetes.io/rewrite-target: "/"
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/use-regex: "true"
tls: []
resources: {}


Loading…
Cancel
Save