Update envoy version for Mobile shopping API Gateway

This commit is contained in:
Tarun Jain 2022-02-23 16:09:32 +05:30
parent 57bc496879
commit ae41fcf02d
4 changed files with 62 additions and 49 deletions

View File

@ -9,19 +9,20 @@ static_resources:
- address: - address:
socket_address: socket_address:
address: 0.0.0.0 address: 0.0.0.0
port_value: 80 port_value: 8080
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:
@ -77,63 +78,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

@ -27,6 +27,10 @@ spec:
linkerd.io/inject: enabled linkerd.io/inject: enabled
{{- end }} {{- end }}
spec: spec:
securityContext:
runAsUser: 2000
runAsGroup: 3000
fsGroup: 2000
{{ if .Values.inf.registry -}} {{ if .Values.inf.registry -}}
imagePullSecrets: imagePullSecrets:
- name: {{ .Values.inf.registry.secretName }} - name: {{ .Values.inf.registry.secretName }}
@ -88,7 +92,7 @@ spec:
{{- end }} {{- end }}
ports: ports:
- name: http - name: http
containerPort: 80 containerPort: 8080
protocol: TCP protocol: TCP
- name: admin - name: admin
containerPort: 8001 containerPort: 8001

View File

@ -39,7 +39,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: /mobileshoppingapigw
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: {}