Fixes to enoyroute

This commit is contained in:
Nish Anil 2022-02-15 23:11:28 +05:30
parent d141ee6aa2
commit 077538d05c
3 changed files with 56 additions and 47 deletions

View File

@ -12,16 +12,17 @@ static_resources:
port_value: 80 port_value: 80
filter_chains: filter_chains:
- filters: - filters:
- name: envoy.http_connection_manager - name: envoy.filters.network.http_connection_manager
config: typed_config:
codec_type: auto "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
stat_prefix: ingress_http stat_prefix: ingress_http
codec_type: AUTO
route_config: route_config:
name: eshop_backend_route name: eshop_backend_route
virtual_hosts: virtual_hosts:
- name: eshop_backend - name: eshop_backend
domains: domains:
- "*" - ["*"]
routes: routes:
- name: "c-short" - name: "c-short"
match: match:
@ -80,63 +81,70 @@ static_resources:
prefix_rewrite: "/" prefix_rewrite: "/"
cluster: shoppingagg cluster: shoppingagg
http_filters: http_filters:
- name: envoy.router - name: envoy.filters.http.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"
clusters: clusters:
- name: shoppingagg - name: shoppingagg
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: load_assignment:
- socket_address: cluster_name: shoppingagg
address: webshoppingagg endpoints:
port_value: 80 - lb_endpoints:
- endpoint:
address:
socket_address:
address: webshoppingagg
port_value: 80
- name: catalog - name: catalog
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: load_assignment:
- socket_address: cluster_name: catalog
address: catalog-api endpoints:
port_value: 80 - lb_endpoints:
- endpoint:
address:
socket_address:
address: catalog-api
port_value: 80
- name: basket - name: basket
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: load_assignment:
- socket_address: cluster_name: basket
address: basket-api endpoints:
port_value: 80 - lb_endpoints:
- endpoint:
address:
socket_address:
address: basket-api
port_value: 80
- name: ordering - name: ordering
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: load_assignment:
- socket_address: cluster_name: ordering
address: ordering-api endpoints:
port_value: 80 - lb_endpoints:
- endpoint:
address:
socket_address:
address: ordering-api
port_value: 80
- name: signalr-hub - name: signalr-hub
connect_timeout: 0.25s connect_timeout: 0.25s
type: strict_dns type: strict_dns
lb_policy: round_robin lb_policy: round_robin
hosts: load_assignment:
- socket_address: cluster_name: signalr-hub
address: ordering-signalrhub endpoints:
port_value: 80 - lb_endpoints:
- endpoint:
address:
socket_address:
address: ordering-signalrhub
port_value: 80

View File

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

View File

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