documentos: novo servico de anexos (ADR fronteira) + rota /api/documentos nos 3 tenants

This commit is contained in:
deploy
2026-06-18 15:37:15 +00:00
parent 86e6822a15
commit 46916f8421
6 changed files with 162 additions and 0 deletions
+1
View File
@@ -61,6 +61,7 @@ spec:
- { path: /api/campeonato, pathType: Prefix, backend: { service: { name: servico-campeonato, port: { number: 80 } } } }
- { path: /api/saude, pathType: Prefix, backend: { service: { name: servico-saude, port: { number: 80 } } } }
- { path: /api/financeiro, pathType: Prefix, backend: { service: { name: servico-financeiro, port: { number: 80 } } } }
- { path: /api/documentos, pathType: Prefix, backend: { service: { name: servico-documentos, 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-acme.athleticmap.influxdigital.com.br
+53
View File
@@ -0,0 +1,53 @@
# Bounded context "documentos" (servico de anexos centralizado, ADR-0002 + decisao 2026-06-18).
# Schema proprio "documentos"; roteado em /api/documentos no ingress do tenant.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: servico-documentos
namespace: acme-prod
labels: { app: servico-documentos, athleticmap.io/contexto: documentos }
spec:
replicas: 1
selector: { matchLabels: { app: servico-documentos } }
template:
metadata:
labels: { app: servico-documentos, athleticmap.io/contexto: documentos }
spec:
containers:
- name: servico-documentos
image: docker.io/library/servico-documentos: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-acme.athleticmap.influxdigital.com.br/realms/athleticmap" }
- { name: ATM_TENANT, value: "acme" }
resources:
requests: { cpu: 100m, memory: 300Mi }
limits: { cpu: "1", memory: 640Mi }
readinessProbe:
httpGet: { path: /api/documentos/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-documentos
namespace: acme-prod
labels: { app: servico-documentos }
spec:
selector: { app: servico-documentos }
ports: [{ name: http, port: 80, targetPort: 8083 }]
+1
View File
@@ -61,6 +61,7 @@ spec:
- { path: /api/campeonato, pathType: Prefix, backend: { service: { name: servico-campeonato, port: { number: 80 } } } }
- { path: /api/saude, pathType: Prefix, backend: { service: { name: servico-saude, port: { number: 80 } } } }
- { path: /api/financeiro, pathType: Prefix, backend: { service: { name: servico-financeiro, port: { number: 80 } } } }
- { path: /api/documentos, pathType: Prefix, backend: { service: { name: servico-documentos, 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-demo.athleticmap.influxdigital.com.br
+53
View File
@@ -0,0 +1,53 @@
# Bounded context "documentos" (servico de anexos centralizado, ADR-0002 + decisao 2026-06-18).
# Schema proprio "documentos"; roteado em /api/documentos no ingress do tenant.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: servico-documentos
namespace: demo-prod
labels: { app: servico-documentos, athleticmap.io/contexto: documentos }
spec:
replicas: 1
selector: { matchLabels: { app: servico-documentos } }
template:
metadata:
labels: { app: servico-documentos, athleticmap.io/contexto: documentos }
spec:
containers:
- name: servico-documentos
image: docker.io/library/servico-documentos: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-demo.athleticmap.influxdigital.com.br/realms/athleticmap" }
- { name: ATM_TENANT, value: "demo" }
resources:
requests: { cpu: 100m, memory: 300Mi }
limits: { cpu: "1", memory: 640Mi }
readinessProbe:
httpGet: { path: /api/documentos/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-documentos
namespace: demo-prod
labels: { app: servico-documentos }
spec:
selector: { app: servico-documentos }
ports: [{ name: http, port: 80, targetPort: 8083 }]
+1
View File
@@ -61,6 +61,7 @@ spec:
- { path: /api/campeonato, pathType: Prefix, backend: { service: { name: servico-campeonato, port: { number: 80 } } } }
- { path: /api/saude, pathType: Prefix, backend: { service: { name: servico-saude, port: { number: 80 } } } }
- { path: /api/financeiro, pathType: Prefix, backend: { service: { name: servico-financeiro, port: { number: 80 } } } }
- { path: /api/documentos, pathType: Prefix, backend: { service: { name: servico-documentos, 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
+53
View File
@@ -0,0 +1,53 @@
# Bounded context "documentos" (servico de anexos centralizado, ADR-0002 + decisao 2026-06-18).
# Schema proprio "documentos"; roteado em /api/documentos no ingress do tenant.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: servico-documentos
namespace: piloto-prod
labels: { app: servico-documentos, athleticmap.io/contexto: documentos }
spec:
replicas: 1
selector: { matchLabels: { app: servico-documentos } }
template:
metadata:
labels: { app: servico-documentos, athleticmap.io/contexto: documentos }
spec:
containers:
- name: servico-documentos
image: docker.io/library/servico-documentos: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: 100m, memory: 300Mi }
limits: { cpu: "1", memory: 640Mi }
readinessProbe:
httpGet: { path: /api/documentos/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-documentos
namespace: piloto-prod
labels: { app: servico-documentos }
spec:
selector: { app: servico-documentos }
ports: [{ name: http, port: 80, targetPort: 8083 }]