- Aula 08: nginx-ingress TCP passthrough gitlab→gitea, comments
- Aula 09: add-client.sh API GitLab→Gitea
- Aula 11: node-bugado deployment image registry.kube.quest→gitea.kube.quest
- Aula 12: setup.sh/cleanup.sh API GitLab→Gitea, ArgoCD repoURL
- Aula 13: k8s manifests, benchmarks: registry.kube.quest→gitea.kube.quest,
gitlab-registry→gitea-registry, GITLAB_TOKEN→GITEA_TOKEN
- Aula 14: comments GitLab→Gitea
- README raiz: arquitetura, tabela, DNS
77 lines
2.0 KiB
YAML
77 lines
2.0 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
|
|
image: gitea.kube.quest/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
|