mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 03:52:44 +00:00
changes
This commit is contained in:
160
deploy.yaml
160
deploy.yaml
@@ -1,51 +1,77 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: server-a
|
||||
labels:
|
||||
server: "http"
|
||||
expose: "true"
|
||||
spec:
|
||||
containers:
|
||||
- name: front-end
|
||||
image: beppev/server-a:latest
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
server: "http"
|
||||
expose: "true"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
server: "http"
|
||||
expose: "true"
|
||||
spec:
|
||||
containers:
|
||||
- name: front-end
|
||||
image: beppev/server-a:latest
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: server-b
|
||||
labels:
|
||||
server: "http"
|
||||
app: "ja"
|
||||
version: v1
|
||||
spec:
|
||||
containers:
|
||||
- name: front-end
|
||||
image: beppev/server-b:latest
|
||||
ports:
|
||||
- containerPort: 6000
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
server: "http"
|
||||
app: "ja"
|
||||
version: v1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
server: "http"
|
||||
app: "ja"
|
||||
version: v1
|
||||
spec:
|
||||
containers:
|
||||
- name: front-end
|
||||
image: beppev/server-b:latest
|
||||
ports:
|
||||
- containerPort: 6000
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: server-c
|
||||
labels:
|
||||
server: "http"
|
||||
app: "ja"
|
||||
version: v2
|
||||
spec:
|
||||
containers:
|
||||
- name: front-end
|
||||
image: beppev/server-c:latest
|
||||
ports:
|
||||
- containerPort: 6000
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
server: "http"
|
||||
app: "ja"
|
||||
version: v2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
server: "http"
|
||||
app: "ja"
|
||||
version: v2
|
||||
spec:
|
||||
containers:
|
||||
- name: front-end
|
||||
image: beppev/server-c:latest
|
||||
ports:
|
||||
- containerPort: 6000
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metedata:
|
||||
metadata:
|
||||
name: server-b-c-service
|
||||
spec:
|
||||
selector:
|
||||
@@ -83,3 +109,71 @@ spec:
|
||||
targetPort: 5000
|
||||
port: 80
|
||||
type: LoadBalancer
|
||||
---
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: DestinationRule
|
||||
metadata:
|
||||
name: server-check-destination
|
||||
spec:
|
||||
host: server-check
|
||||
subsets:
|
||||
- name: v1
|
||||
labels:
|
||||
version: v1
|
||||
- name: v2
|
||||
labels:
|
||||
version: v2
|
||||
---
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: server-check-gateway
|
||||
spec:
|
||||
selector:
|
||||
expose: "true"
|
||||
servers:
|
||||
- port:
|
||||
number: 6000
|
||||
name: tcp
|
||||
protocol: TCP
|
||||
hosts:
|
||||
- "*"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: server-check
|
||||
spec:
|
||||
selector:
|
||||
expose: "true"
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
targetPort: 6000
|
||||
port: 6000
|
||||
---
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: server-check-service
|
||||
spec:
|
||||
hosts:
|
||||
- "*"
|
||||
gateways:
|
||||
- server-check-gateway
|
||||
tcp:
|
||||
- match:
|
||||
- port: 6000
|
||||
route:
|
||||
- destination:
|
||||
host: server-b-c-service
|
||||
port:
|
||||
number: 6000
|
||||
subset: v1
|
||||
weight: 50
|
||||
- destination:
|
||||
host: server-b-c-service
|
||||
port:
|
||||
number: 6000
|
||||
subset: v2
|
||||
weight: 50
|
Reference in New Issue
Block a user