Files
athletic-map-deploy/tenants/escolinha/70-servico-configuracao.yaml
T

61 lines
2.2 KiB
YAML

# Bounded context "configuracao" como app proprio (ADR-0002): Deployment/pod
# medivel = centro de custo. Schema proprio "configuracao" no Postgres do silo
# (criado pelo Flyway). Roteado em /api/configuracao no ingress do tenant.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: servico-configuracao
namespace: escolinha-prod
labels:
app: servico-configuracao
athleticmap.io/contexto: configuracao
spec:
replicas: 0
selector: { matchLabels: { app: servico-configuracao } }
template:
metadata:
labels:
app: servico-configuracao
athleticmap.io/contexto: configuracao
spec:
containers:
- name: servico-configuracao
image: docker.io/library/servico-configuracao:1.10-categoria-modalidade
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.plataforma-prod.svc:8080/realms/athleticmap-4/protocol/openid-connect/certs" }
- { name: ATM_ISSUER, value: "https://auth.athleticmap.com/realms/athleticmap-4" }
- { name: ATM_TENANT, value: "escolinha" }
resources:
requests: { cpu: 50m, memory: 320Mi }
limits: { cpu: "1", memory: 768Mi }
readinessProbe:
httpGet: { path: /api/configuracao/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-configuracao
namespace: escolinha-prod
labels:
app: servico-configuracao
spec:
selector: { app: runtime-core }
ports: [{ name: http, port: 80, targetPort: 8083 }]