mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 12:02:47 +00:00
193 lines
4.4 KiB
YAML
193 lines
4.4 KiB
YAML
# ---
|
|
# apiVersion: v1
|
|
# kind: Namespace
|
|
# metadata:
|
|
# name: consul-project-1
|
|
# annotations:
|
|
# "consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: server-a
|
|
# namespace: consul-project-1
|
|
annotations:
|
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
"consul.hashicorp.com/connect-service-upstreams": "server-b:6000"
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
server: "http"
|
|
app: "project-1"
|
|
expose: "true"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
server: "http"
|
|
app: "project-1"
|
|
expose: "true"
|
|
annotations:
|
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
spec:
|
|
containers:
|
|
- name: server-a #in tegenstelling tot istio, gebruikt consul de container naam, fam...
|
|
image: beppev/server-a:master
|
|
imagePullPolicy: "Always"
|
|
ports:
|
|
- containerPort: 5000
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: server-b
|
|
# namespace: consul-project-1
|
|
annotations:
|
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
server: "http"
|
|
app: "project-1"
|
|
version: v1
|
|
backend: "true"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
server: "http"
|
|
app: "project-1"
|
|
version: v1
|
|
backend: "true"
|
|
annotations:
|
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
spec:
|
|
containers:
|
|
- name: server-b
|
|
image: beppev/server-b:master
|
|
imagePullPolicy: "Always"
|
|
ports:
|
|
- containerPort: 6000
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: server-b-test
|
|
# namespace: consul-project-1
|
|
annotations:
|
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
server: "http"
|
|
app: "project-1"
|
|
version: v2
|
|
backend: "true"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
server: "http"
|
|
app: "project-1"
|
|
version: v2
|
|
backend: "true"
|
|
annotations:
|
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
spec:
|
|
containers:
|
|
- name: server-b-test
|
|
image: beppev/server-b:experimental
|
|
imagePullPolicy: "Always"
|
|
ports:
|
|
- containerPort: 6000
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: server-d
|
|
# namespace: consul-project-1
|
|
annotations:
|
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: "project-1"
|
|
mirror: "true"
|
|
server: "http"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: "project-1"
|
|
mirror: "true"
|
|
server: "http"
|
|
annotations:
|
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
spec:
|
|
containers:
|
|
- name: server-d
|
|
image: beppev/server-d:master
|
|
ports:
|
|
- containerPort: 6000
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: expose-service
|
|
# namespace: consul-project-1
|
|
annotations:
|
|
"consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
labels:
|
|
app: "project-1"
|
|
spec:
|
|
selector:
|
|
expose: "true"
|
|
ports:
|
|
- name: http
|
|
protocol: TCP
|
|
port: 5000
|
|
targetPort: 5000
|
|
nodePort: 30036
|
|
type: NodePort
|
|
---
|
|
# apiVersion: v1
|
|
# kind: Service
|
|
# metadata:
|
|
# name: server-check
|
|
# # namespace: consul-project-1
|
|
# annotations:
|
|
# "consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
# labels:
|
|
# app: "project-1"
|
|
# spec:
|
|
# selector:
|
|
# backend: "true"
|
|
# ports:
|
|
# - name: http
|
|
# protocol: TCP
|
|
# port: 6000
|
|
# ---
|
|
# apiVersion: v1
|
|
# kind: Service
|
|
# metadata:
|
|
# name: mirror-service
|
|
# # namespace: consul-project-1
|
|
# annotations:
|
|
# "consul.hashicorp.com/connect-inject": "true" #dit is hoe consul injection handled
|
|
# labels:
|
|
# app: "project-1"
|
|
# spec:
|
|
# selector:
|
|
# mirror: "true"
|
|
# ports:
|
|
# - name: http
|
|
# protocol: TCP
|
|
# port: 6000
|
|
# ---
|
|
# kind: service-splitter
|
|
# name: server-check
|
|
# splits:
|
|
# - weight: 90
|
|
# service_subset: "v1"
|
|
# - weight: 10
|
|
# service_subset: "v2" |