Files
athletic-map-deploy/tenants/acme/78-servico-saude.yaml
T

59 lines
2.0 KiB
YAML

# Bounded context "saude" (2a onda): RegistroSaude (registros por especialidade).
# Schema proprio "saude" (Flyway). Roteado em /api/saude no ingress.
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: servico-saude
namespace: acme-prod
labels:
app: servico-saude
athleticmap.io/contexto: saude
spec:
replicas: 1
selector: { matchLabels: { app: servico-saude } }
template:
metadata:
labels:
app: servico-saude
athleticmap.io/contexto: saude
spec:
containers:
- name: servico-saude
image: docker.io/library/servico-saude:1.5
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: 150m, memory: 320Mi }
limits: { cpu: "1", memory: 768Mi }
readinessProbe:
httpGet: { path: /api/saude/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-saude
namespace: acme-prod
labels:
app: servico-saude
spec:
selector: { app: servico-saude }
ports: [{ name: http, port: 80, targetPort: 8083 }]