91 lines
2.4 KiB
YAML
91 lines
2.4 KiB
YAML
# P4.3-P4.9 — runtime-core do demo. GERADO por scripts/consolidar_demo.py a partir
|
|
# da uniao do ambiente dos servicos que ele absorve. Nao edite a mao sem rodar o
|
|
# --check de novo.
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: runtime-core
|
|
namespace: demo-prod
|
|
labels:
|
|
app: runtime-core
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: runtime-core
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: runtime-core
|
|
athleticmap.io/contexto: runtime-core
|
|
spec:
|
|
containers:
|
|
- name: runtime-core
|
|
image: docker.io/library/runtime-core:1.2-auditoria
|
|
imagePullPolicy: Never
|
|
ports:
|
|
- containerPort: 8083
|
|
env:
|
|
- name: SPRING_DATASOURCE_URL
|
|
value: jdbc:postgresql://pgbouncer.plataforma-prod.svc.cluster.local:6432/athleticmap_demo
|
|
- name: SPRING_DATASOURCE_USERNAME
|
|
value: r_demo
|
|
- name: SPRING_DATASOURCE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: db-compartilhado
|
|
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.com/realms/athleticmap
|
|
- name: ATM_TENANT
|
|
value: demo
|
|
- name: ATM_PLANO
|
|
value: institucional
|
|
- name: ATM_KC_ADMIN_ENABLED
|
|
value: 'true'
|
|
- name: ATM_KC_CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: kc-admin-secret
|
|
key: client-secret
|
|
- name: SPRING_DATASOURCE_HIKARI_MAXIMUM_POOL_SIZE
|
|
value: '10'
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 384Mi
|
|
limits:
|
|
cpu: '1'
|
|
memory: 768Mi
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /actuator/health/readiness
|
|
port: 8083
|
|
initialDelaySeconds: 25
|
|
periodSeconds: 10
|
|
failureThreshold: 30
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /actuator/health/liveness
|
|
port: 8083
|
|
initialDelaySeconds: 90
|
|
periodSeconds: 20
|
|
failureThreshold: 6
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: runtime-core
|
|
namespace: demo-prod
|
|
labels:
|
|
app: runtime-core
|
|
spec:
|
|
selector:
|
|
app: runtime-core
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: 8083
|