mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 12:02:47 +00:00
aanpassing deployment voor traffic mirror test
This commit is contained in:
73
deploy.yaml
73
deploy.yaml
@@ -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
|
Reference in New Issue
Block a user