feat(aula-14): adicionar Istio Traffic Splitting com canary deployment
- Instala Istio (base + istiod + ingressgateway) - Configura Kiali e Jaeger para observabilidade - Deploy de app-backend v1 e v2 com traffic splitting 90/10 - Integra com Victoria Metrics da aula-12 - Inclui teste-stress.sh para validar distribuição de tráfego - Tráfego externo passa pelo Istio Gateway via NGINX Ingress
This commit is contained in:
53
aula-14/k8s/deployment-v2.yaml
Normal file
53
aula-14/k8s/deployment-v2.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: app-backend-v2
|
||||
namespace: istio
|
||||
labels:
|
||||
app: app-backend
|
||||
version: v2
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: app-backend
|
||||
version: v2
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: app-backend
|
||||
version: v2
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
containers:
|
||||
- name: app-backend
|
||||
image: ${REGISTRY_HOST}/${REGISTRY_PROJECT}/app-backend:v2
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
env:
|
||||
- name: MAX_REQUESTS
|
||||
value: "100"
|
||||
resources:
|
||||
requests:
|
||||
memory: "64Mi"
|
||||
cpu: "50m"
|
||||
limits:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 3000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 3000
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 3
|
||||
failureThreshold: 2
|
||||
terminationGracePeriodSeconds: 10
|
||||
Reference in New Issue
Block a user