Bugs corrigidos: - aula-15: tracing.js fallback OTel endpoint usava service name errado (otel-collector vs otel-collector-opentelemetry-collector) - aula-11/13: manifests k8s com gitea.kube.quest hardcoded → placeholder Arquivos legado removidos (9): - aula-10: gitlab-values.yaml, gitlab-registry-storage-secret.yaml, object-storage-secret.yaml, registry-storage-secret.yaml - aula-11: gitlab-runner-values.yaml, node-bugado/.gitlab-ci.yml - aula-13: 3x .gitlab-ci.yml (substituídos por .gitea/workflows/ci.yml) CLAUDE.md: comandos rápidos agora incluem aula-14 e aula-15
78 lines
2.1 KiB
YAML
78 lines
2.1 KiB
YAML
# =============================================================================
|
|
# Deployment - node-bugado
|
|
# =============================================================================
|
|
#
|
|
# Deployment com liveness e readiness probes.
|
|
# A imagem é atualizada automaticamente pelo pipeline Gitea Actions.
|
|
#
|
|
# =============================================================================
|
|
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: node-bugado
|
|
labels:
|
|
app: node-bugado
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: node-bugado
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: node-bugado
|
|
spec:
|
|
terminationGracePeriodSeconds: 5
|
|
containers:
|
|
- name: node-bugado
|
|
# IMPORTANTE: Esta linha é atualizada automaticamente pelo Gitea Actions
|
|
# Substitua GITEA_HOST pelo hostname do seu Gitea (ex: gitea.kube.quest)
|
|
image: GITEA_HOST_PLACEHOLDER/depaula/node-bugado:latest
|
|
ports:
|
|
- containerPort: 3000
|
|
name: http
|
|
|
|
# Variáveis de ambiente via ConfigMap
|
|
env:
|
|
- name: MAX_REQUESTS
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: node-bugado-config
|
|
key: MAX_REQUESTS
|
|
|
|
# Recursos
|
|
resources:
|
|
requests:
|
|
memory: "64Mi"
|
|
cpu: "50m"
|
|
limits:
|
|
memory: "128Mi"
|
|
cpu: "100m"
|
|
|
|
# Liveness probe - detecta quando a app trava
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3000
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 3
|
|
failureThreshold: 2
|
|
timeoutSeconds: 2
|
|
|
|
# Readiness probe - remove do service enquanto não está pronta
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 3000
|
|
initialDelaySeconds: 2
|
|
periodSeconds: 2
|
|
failureThreshold: 1
|
|
timeoutSeconds: 1
|
|
|
|
# Pod security context
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
fsGroup: 1000
|