-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathvirtual-service.yaml
31 lines (31 loc) · 1.04 KB
/
virtual-service.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: {{ .Values.global.hostnamePrefix }}-domaincc-virtservice
labels: {{- toYaml .Values.labels | nindent 4 }}
spec:
# Refer to https://animated-carnival-57b3e7f5.pages.github.io/container-platform/routing-traffic/
hosts: [{{ .Values.global.endpoint }}]
gateways: [istio-system/ldx-{{ .Values.global.lhdiCluster }}-1-{{ .Values.global.environment }}-gateway]
http:
- match:
# Using solution at https://github.com/istio/istio/issues/8076#issuecomment-515278023
- uri:
prefix: /{{ .Values.serviceUriPrefix }}/
- uri:
exact: /{{ .Values.serviceUriPrefix }}
rewrite:
uri: /
route:
- destination:
# Should match metadata.name in helm/charts/domain-cc/templates/service.yaml
host: {{ .Values.global.hostnamePrefix }}-cc-app
port:
number: 8120
headers:
response:
remove:
- Server
request:
set:
X-Forwarded-Prefix: /{{ .Values.serviceUriPrefix }}