iac/rmk/infrastructure/istio-config/virtualservice-eav-api.yaml

164 lines
3.1 KiB
YAML

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: eav-api
namespace: default
labels:
app.kubernetes.io/managed-by: Helm
spec:
hosts:
- sarex.stand.sarex.tech
gateways:
- default/platform-gateway
http:
- match:
- uri:
prefix: /eav/api/v0
rewrite:
uri: /api/v4
route:
- destination:
host: backend-svc.eav.svc.cluster.local
port:
number: 80
corsPolicy:
allowOrigins:
- regex: (https://.*\.sarex\.io)|(https://localhost:.*)
allowMethods:
- POST
- GET
- OPTIONS
- PUT
- DELETE
- PATCH
allowHeaders:
- Authorization
- Content-Type
- Identity
maxAge: 24h
- match:
- uri:
prefix: /eav/api/v2
rewrite:
uri: /api/v5
route:
- destination:
host: backend-svc.eav.svc.cluster.local
port:
number: 80
corsPolicy:
allowOrigins:
- regex: (https://.*\.sarex\.io)|(https://localhost:.*)
allowMethods:
- POST
- GET
- OPTIONS
- PUT
- DELETE
- PATCH
allowHeaders:
- Authorization
- Content-Type
- Identity
maxAge: 24h
- match:
- uri:
prefix: /eav/api/v3
rewrite:
uri: /api/v3
route:
- destination:
host: backend-svc.eav.svc.cluster.local
port:
number: 80
corsPolicy:
allowOrigins:
- regex: (https://.*\.sarex\.io)|(https://localhost:.*)
allowMethods:
- POST
- GET
- OPTIONS
- PUT
- DELETE
- PATCH
allowHeaders:
- Authorization
- Content-Type
- Identity
maxAge: 24h
- match:
- uri:
prefix: /eav/api/v4
rewrite:
uri: /api/v4
route:
- destination:
host: backend-svc.eav.svc.cluster.local
port:
number: 80
corsPolicy:
allowOrigins:
- regex: (https://.*\.sarex\.io)|(https://localhost:.*)
allowMethods:
- POST
- GET
- OPTIONS
- PUT
- DELETE
- PATCH
allowHeaders:
- Authorization
- Content-Type
- Identity
maxAge: 24h
- match:
- uri:
prefix: /eav/api/v1
rewrite:
uri: /api/v6
route:
- destination:
host: backend-svc.eav.svc.cluster.local
port:
number: 80
corsPolicy:
allowOrigins:
- regex: (https://.*\.sarex\.io)|(https://localhost:.*)
allowMethods:
- POST
- GET
- OPTIONS
- PUT
- DELETE
- PATCH
allowHeaders:
- Authorization
- Content-Type
- Identity
maxAge: 24h
- match:
- uri:
prefix: /eav/admin/
rewrite:
uri: /eav/admin/
route:
- destination:
host: backend-svc.eav.svc.cluster.local
port:
number: 80
corsPolicy:
allowOrigins:
- regex: (https://.*\.sarex\.io)|(https://localhost:.*)
allowMethods:
- POST
- GET
- OPTIONS
- PUT
- DELETE
- PATCH
allowHeaders:
- Authorization
- Content-Type
- Identity
maxAge: 24h