mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 12:02:47 +00:00
consul fix, rip
This commit is contained in:
87
deploy.yaml
87
deploy.yaml
@@ -1,16 +1,18 @@
|
|||||||
---
|
# ---
|
||||||
apiVersion: v1
|
# apiVersion: v1
|
||||||
kind: Namespace
|
# kind: Namespace
|
||||||
metadata:
|
# metadata:
|
||||||
name: consul-project-1
|
# name: consul-project-1
|
||||||
annotations:
|
# annotations:
|
||||||
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
# "consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: server-a
|
name: server-a
|
||||||
namespace: consul-project-1
|
# namespace: consul-project-1
|
||||||
|
annotations:
|
||||||
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
@@ -36,7 +38,9 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: server-b
|
name: server-b
|
||||||
namespace: consul-project-1
|
# namespace: consul-project-1
|
||||||
|
annotations:
|
||||||
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
@@ -64,7 +68,9 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: server-b-test
|
name: server-b-test
|
||||||
namespace: consul-project-1
|
# namespace: consul-project-1
|
||||||
|
annotations:
|
||||||
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
@@ -80,6 +86,8 @@ spec:
|
|||||||
app: "project-1"
|
app: "project-1"
|
||||||
version: v2
|
version: v2
|
||||||
backend: "true"
|
backend: "true"
|
||||||
|
annotations:
|
||||||
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: front-end
|
- name: front-end
|
||||||
@@ -92,7 +100,9 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: server-d
|
name: server-d
|
||||||
namespace: consul-project-1
|
# namespace: consul-project-1
|
||||||
|
annotations:
|
||||||
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
@@ -100,24 +110,28 @@ spec:
|
|||||||
app: "project-1"
|
app: "project-1"
|
||||||
mirror: "true"
|
mirror: "true"
|
||||||
server: "http"
|
server: "http"
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: "project-1"
|
app: "project-1"
|
||||||
mirror: "true"
|
mirror: "true"
|
||||||
server: "http"
|
server: "http"
|
||||||
spec:
|
annotations:
|
||||||
containers:
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
||||||
- name: front-end
|
spec:
|
||||||
image: beppev/server-d:master
|
containers:
|
||||||
ports:
|
- name: front-end
|
||||||
- containerPort: 6000
|
image: beppev/server-d:master
|
||||||
|
ports:
|
||||||
|
- containerPort: 6000
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: expose-service
|
name: expose-service
|
||||||
namespace: consul-project-1
|
# namespace: consul-project-1
|
||||||
|
annotations:
|
||||||
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
||||||
labels:
|
labels:
|
||||||
app: "project-1"
|
app: "project-1"
|
||||||
spec:
|
spec:
|
||||||
@@ -127,12 +141,17 @@ spec:
|
|||||||
- name: http
|
- name: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
port: 5000
|
port: 5000
|
||||||
|
targetPort: 5000
|
||||||
|
nodePort: 30036
|
||||||
|
type: NodePort
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: backend-service
|
name: server-check
|
||||||
namespace: consul-project-1
|
# namespace: consul-project-1
|
||||||
|
annotations:
|
||||||
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
||||||
labels:
|
labels:
|
||||||
app: "project-1"
|
app: "project-1"
|
||||||
spec:
|
spec:
|
||||||
@@ -147,7 +166,9 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: mirror-service
|
name: mirror-service
|
||||||
namespace: consul-project-1
|
# namespace: consul-project-1
|
||||||
|
annotations:
|
||||||
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
||||||
labels:
|
labels:
|
||||||
app: "project-1"
|
app: "project-1"
|
||||||
spec:
|
spec:
|
||||||
@@ -155,5 +176,13 @@ spec:
|
|||||||
mirror: "true"
|
mirror: "true"
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
port: 6000
|
port: 6000
|
||||||
|
---
|
||||||
|
# kind: service-splitter
|
||||||
|
# name: server-check
|
||||||
|
# splits:
|
||||||
|
# - weight: 90
|
||||||
|
# service_subset: "v1"
|
||||||
|
# - weight: 10
|
||||||
|
# service_subset: "v2"
|
Reference in New Issue
Block a user