feat(piloto): servico-bff (agregador) + rota /bff

This commit is contained in:
ATM Platform
2026-06-16 23:48:55 +00:00
parent 52541692da
commit 36242ea35c
2 changed files with 56 additions and 0 deletions
+1
View File
@@ -144,6 +144,7 @@ spec:
paths:
- { path: /api/configuracao, pathType: Prefix, backend: { service: { name: servico-configuracao, port: { number: 80 } } } }
- { 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, pathType: Prefix, backend: { service: { name: backend, port: { number: 80 } } } }
- { path: /, pathType: Prefix, backend: { service: { name: frontend, port: { number: 80 } } } }
- host: auth-piloto.athleticmap.influxdigital.com.br
+55
View File
@@ -0,0 +1,55 @@
# BFF (Backend-for-Frontend) — ponto unico da SPA; agrega configuracao + cadastro
# com token relay. Stateless (sem banco). Roteado em /bff no ingress do tenant.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: servico-bff
namespace: piloto-prod
labels:
app: servico-bff
athleticmap.io/contexto: bff
spec:
replicas: 1
selector: { matchLabels: { app: servico-bff } }
template:
metadata:
labels:
app: servico-bff
athleticmap.io/contexto: bff
spec:
containers:
- name: servico-bff
image: docker.io/library/servico-bff:1.0
imagePullPolicy: Never
ports: [{ containerPort: 8083 }]
env:
- { name: ATM_CONFIG_URL, value: "http://servico-configuracao" }
- { name: ATM_CADASTRO_URL, value: "http://servico-cadastro" }
- { 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: 100m, memory: 256Mi }
limits: { cpu: 500m, memory: 512Mi }
readinessProbe:
httpGet: { path: /bff/health, port: 8083 }
initialDelaySeconds: 20
periodSeconds: 10
failureThreshold: 30
livenessProbe:
httpGet: { path: /actuator/health/liveness, port: 8083 }
initialDelaySeconds: 50
periodSeconds: 20
failureThreshold: 6
---
apiVersion: v1
kind: Service
metadata:
name: servico-bff
namespace: piloto-prod
labels:
app: servico-bff
spec:
selector: { app: servico-bff }
ports: [{ name: http, port: 80, targetPort: 8083 }]