feat(piloto): servico-planejamento (Treino/PlanoAula) + rota /api/planejamento

This commit is contained in:
ATM Platform
2026-06-17 00:58:43 +00:00
parent df6ede9178
commit 1039528c87
2 changed files with 59 additions and 0 deletions
+1
View File
@@ -57,6 +57,7 @@ spec:
- { path: /api/cadastro, pathType: Prefix, backend: { service: { name: servico-cadastro, port: { number: 80 } } } }
- { path: /bff, pathType: Prefix, backend: { service: { name: servico-bff, port: { number: 80 } } } }
- { path: /api/organizacao, pathType: Prefix, backend: { service: { name: servico-organizacao, port: { number: 80 } } } }
- { path: /api/planejamento, pathType: Prefix, backend: { service: { name: servico-planejamento, port: { number: 80 } } } }
- { path: /api, pathType: Prefix, backend: { service: { name: backend, port: { number: 80 } } } }
- { path: /, pathType: Prefix, backend: { service: { name: frontend-spa, port: { number: 80 } } } }
- host: auth-piloto.athleticmap.influxdigital.com.br
@@ -0,0 +1,58 @@
# 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: piloto-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.0
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_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-piloto.athleticmap.influxdigital.com.br/realms/athleticmap" }
- { name: ATM_TENANT, value: "piloto" }
resources:
requests: { cpu: 150m, 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: piloto-prod
labels:
app: servico-planejamento
spec:
selector: { app: servico-planejamento }
ports: [{ name: http, port: 80, targetPort: 8083 }]