Files
athletic-map-deploy/tenants/acme/74-servico-planejamento.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

60 lines
2.1 KiB
YAML

# Bounded context "planejamento" como app proprio (ADR-0002): Treino e Plano de Aula.
# Schema proprio "planejamento" (Flyway). Roteado em /api/planejamento no ingress.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: servico-planejamento
namespace: acme-prod
labels:
app: servico-planejamento
athleticmap.io/contexto: planejamento
spec:
replicas: 1
selector: { matchLabels: { app: servico-planejamento } }
template:
metadata:
labels:
app: servico-planejamento
athleticmap.io/contexto: planejamento
spec:
containers:
- name: servico-planejamento
image: docker.io/library/servico-planejamento:1.3
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-acme.athleticmap.influxdigital.com.br/realms/athleticmap" }
- { name: ATM_TENANT, value: "acme" }
resources:
requests: { cpu: 50m, memory: 320Mi }
limits: { cpu: "1", memory: 768Mi }
readinessProbe:
httpGet: { path: /api/planejamento/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-planejamento
namespace: acme-prod
labels:
app: servico-planejamento
spec:
selector: { app: servico-planejamento }
ports: [{ name: http, port: 80, targetPort: 8083 }]