c2db5f2c17
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.
65 lines
2.4 KiB
YAML
65 lines
2.4 KiB
YAML
# Bounded context "cadastro" como app proprio (ADR-0002/0003): Deployment/pod
|
|
# medivel = centro de custo. Schema proprio "cadastro" no Postgres do silo
|
|
# (criado pelo Flyway). Roteado em /api/cadastro no ingress do tenant.
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: servico-cadastro
|
|
namespace: escolinha-prod
|
|
labels:
|
|
app: servico-cadastro
|
|
athleticmap.io/contexto: cadastro
|
|
spec:
|
|
replicas: 1
|
|
selector: { matchLabels: { app: servico-cadastro } }
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: servico-cadastro
|
|
athleticmap.io/contexto: cadastro
|
|
spec:
|
|
containers:
|
|
- name: servico-cadastro
|
|
image: docker.io/library/servico-cadastro:1.6
|
|
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-escolinha.athleticmap.influxdigital.com.br/realms/athleticmap" }
|
|
- { name: ATM_TENANT, value: "escolinha" }
|
|
- { name: ATM_KC_ADMIN_ENABLED, value: "true" }
|
|
- name: ATM_KC_CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef: { name: kc-admin-secret, key: client-secret }
|
|
resources:
|
|
requests: { cpu: 50m, memory: 320Mi }
|
|
limits: { cpu: "1", memory: 768Mi }
|
|
readinessProbe:
|
|
httpGet: { path: /api/cadastro/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-cadastro
|
|
namespace: escolinha-prod
|
|
labels:
|
|
app: servico-cadastro
|
|
spec:
|
|
selector: { app: servico-cadastro }
|
|
ports: [{ name: http, port: 80, targetPort: 8083 }]
|