Files
athletic-map-deploy/tenants/escolinha/85-servico-nutricao.yaml
T
atmadmin c2db5f2c17 perf(tenants): reduz CPU requests dos servicos (150m/100m->50m, keycloak 250m->150m) nos 4 tenants
Libera CPU no no unico para acomodar o 4o silo (escolinha) sem hardware novo.
Limits preservados (burst inalterado); apenas o gate de scheduling foi ajustado.
2026-07-28 15:54:21 +00:00

55 lines
2.1 KiB
YAML

# Bounded context "nutricao" (planos alimentares + catalogo de alimentos, ADR-0002).
# Schema proprio "nutricao"; roteado em /api/nutricao no ingress.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: servico-nutricao
namespace: escolinha-prod
labels: { app: servico-nutricao, athleticmap.io/contexto: nutricao }
spec:
replicas: 1
selector: { matchLabels: { app: servico-nutricao } }
template:
metadata:
labels: { app: servico-nutricao, athleticmap.io/contexto: nutricao }
spec:
containers:
- name: servico-nutricao
image: docker.io/library/servico-nutricao:1.9
imagePullPolicy: Never
ports: [{ containerPort: 8083 }]
env:
- { name: SPRING_DATASOURCE_URL, value: "jdbc:postgresql://postgres:5432/athleticmap" }
- { name: SPRING_DATASOURCE_USERNAME, value: "atm" }
- { name: SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE, value: "5" }
- name: SPRING_DATASOURCE_PASSWORD
valueFrom:
secretKeyRef: { name: db-credentials, key: password }
- { name: ATM_JWK_SET_URI, value: "http://keycloak:8080/realms/athleticmap/protocol/openid-connect/certs" }
- { name: ATM_ISSUER, value: "https://auth-escolinha.athleticmap.influxdigital.com.br/realms/athleticmap" }
- { name: ATM_TENANT, value: "escolinha" }
resources:
requests: { cpu: 50m, memory: 300Mi }
limits: { cpu: "1", memory: 640Mi }
readinessProbe:
httpGet: { path: /api/nutricao/health, port: 8083 }
initialDelaySeconds: 25
periodSeconds: 10
failureThreshold: 30
livenessProbe:
httpGet: { path: /actuator/health/liveness, port: 8083 }
initialDelaySeconds: 60
periodSeconds: 20
failureThreshold: 6
---
apiVersion: v1
kind: Service
metadata:
name: servico-nutricao
namespace: escolinha-prod
labels: { app: servico-nutricao }
spec:
selector: { app: servico-nutricao }
ports: [{ name: http, port: 80, targetPort: 8083 }]