From 22498c169848d45aa668dfc361dd603b6446ee32 Mon Sep 17 00:00:00 2001 From: ATM Platform Date: Wed, 17 Jun 2026 12:49:05 +0000 Subject: [PATCH] feat(piloto): servico-campeonato (2a onda) + rota /api/campeonato + cota+ --- tenants/piloto/00-namespace-quota-netpol.yaml | 4 +- tenants/piloto/30-apps-stubs.yaml | 1 + tenants/piloto/76-servico-campeonato.yaml | 58 +++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 tenants/piloto/76-servico-campeonato.yaml diff --git a/tenants/piloto/00-namespace-quota-netpol.yaml b/tenants/piloto/00-namespace-quota-netpol.yaml index 2c1fd79..2a44c45 100644 --- a/tenants/piloto/00-namespace-quota-netpol.yaml +++ b/tenants/piloto/00-namespace-quota-netpol.yaml @@ -19,8 +19,8 @@ spec: hard: requests.cpu: "3" requests.memory: 4Gi - limits.cpu: "8" - limits.memory: 10Gi + limits.cpu: "12" + limits.memory: 12Gi pods: "20" persistentvolumeclaims: "4" --- diff --git a/tenants/piloto/30-apps-stubs.yaml b/tenants/piloto/30-apps-stubs.yaml index a27d028..f682843 100644 --- a/tenants/piloto/30-apps-stubs.yaml +++ b/tenants/piloto/30-apps-stubs.yaml @@ -58,6 +58,7 @@ spec: - { 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/campeonato, pathType: Prefix, backend: { service: { name: servico-campeonato, 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 diff --git a/tenants/piloto/76-servico-campeonato.yaml b/tenants/piloto/76-servico-campeonato.yaml new file mode 100644 index 0000000..a9c7a2f --- /dev/null +++ b/tenants/piloto/76-servico-campeonato.yaml @@ -0,0 +1,58 @@ +# Bounded context "campeonato" (2a onda): Campeonato (estrutura) + Jogo (sumula). +# Schema proprio "campeonato" (Flyway). Roteado em /api/campeonato no ingress. +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: servico-campeonato + namespace: piloto-prod + labels: + app: servico-campeonato + athleticmap.io/contexto: campeonato +spec: + replicas: 1 + selector: { matchLabels: { app: servico-campeonato } } + template: + metadata: + labels: + app: servico-campeonato + athleticmap.io/contexto: campeonato + spec: + containers: + - name: servico-campeonato + image: docker.io/library/servico-campeonato: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/campeonato/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-campeonato + namespace: piloto-prod + labels: + app: servico-campeonato +spec: + selector: { app: servico-campeonato } + ports: [{ name: http, port: 80, targetPort: 8083 }]