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

70 lines
2.7 KiB
YAML

# Bounded context "saude" (2a onda): RegistroSaude (registros por especialidade).
# Schema proprio "saude" (Flyway). Roteado em /api/saude no ingress.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: servico-saude
namespace: acme-prod
labels:
app: servico-saude
athleticmap.io/contexto: saude
spec:
replicas: 1
selector: { matchLabels: { app: servico-saude } }
template:
metadata:
labels:
app: servico-saude
athleticmap.io/contexto: saude
spec:
containers:
- name: servico-saude
image: docker.io/library/servico-saude:1.88-garmin
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" }
# Garmin: DNS devolve IPv6 primeiro e a rota IPv6 do cluster falha; forcar IPv4.
- { name: JAVA_TOOL_OPTIONS, value: "-Djava.net.preferIPv4Stack=true" }
- { name: GARMIN_REDIRECT_URI, value: "https://acme.athleticmap.influxdigital.com.br/api/public/integrations/garmin/callback" }
- { name: GARMIN_FRONTEND_REDIRECT, value: "https://acme.athleticmap.influxdigital.com.br/integracoes/garmin" }
- name: GARMIN_CLIENT_ID
valueFrom:
secretKeyRef: { name: garmin-oauth, key: GARMIN_CLIENT_ID }
- name: GARMIN_CLIENT_SECRET
valueFrom:
secretKeyRef: { name: garmin-oauth, key: GARMIN_CLIENT_SECRET }
resources:
requests: { cpu: 50m, memory: 320Mi }
limits: { cpu: "1", memory: 768Mi }
readinessProbe:
httpGet: { path: /api/saude/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-saude
namespace: acme-prod
labels:
app: servico-saude
spec:
selector: { app: servico-saude }
ports: [{ name: http, port: 80, targetPort: 8083 }]