aanpassing deployment voor traffic mirror test

This commit is contained in:
2020-03-05 09:55:12 +01:00
parent 6739c5c16e
commit 29fdb950f1
5 changed files with 104 additions and 12 deletions

View File

@@ -88,6 +88,44 @@ spec:
ports:
- containerPort: 6000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: server-d
namespace: istio-project-1
spec:
replicas: 1
selector:
matchLabels:
app: "project-1"
mirror: "true"
template:
metadata:
labels:
app: "project-1"
mirror: "true"
spec:
containers:
- name: front-end
image: beppev/server-d:latest
ports:
- containerPort: 6000
---
apiVersion: v1
kind: Service
metadata:
name: mirror-service
namespace: istio-project-1
labels:
app: "project-1"
spec:
selector:
mirror: "true"
ports:
- name: http
protocol: TCP
port: 6000
---
apiVersion: v1
kind: Service
metadata:
@@ -174,6 +212,14 @@ spec:
port:
number: 5000
host: expose-server-service
- match:
- uri:
prefix: /get
route:
- destination:
port:
number: 7000
host: mirror-service
--- # TODO fix gateway zodat we ingress gateway kunnen gebruike ipv de fuken loadbalancer.
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
@@ -209,15 +255,18 @@ spec:
- match:
- port: 6000
route:
- destination:
host: server-check
port:
number: 6000
subset: v1
weight: 50
- destination:
host: server-check
port:
number: 6000
subset: v2
weight: 50
- destination:
host: server-check
port:
number: 6000
subset: v1
weight: 50
- destination:
host: server-check
port:
number: 6000
subset: v2
weight: 50
mirror:
host: mirror-service
mirror_percent: 100