- 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
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
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
|