119 lines
6.6 KiB
YAML
119 lines
6.6 KiB
YAML
# SPA Angular (shell OIDC + admin de catalogos + cadastro de Atleta) consumindo
|
|
# o BFF. Substitui o stub estatico nginx/configMap. Roteado em / no ingress.
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: frontend-spa
|
|
namespace: escolinha-prod
|
|
labels:
|
|
app: frontend-spa
|
|
athleticmap.io/contexto: frontend
|
|
spec:
|
|
replicas: 1
|
|
selector: { matchLabels: { app: frontend-spa } }
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: frontend-spa
|
|
athleticmap.io/contexto: frontend
|
|
spec:
|
|
containers:
|
|
- name: frontend-spa
|
|
image: docker.io/library/frontend-spa:2.82-aviso-cobranca
|
|
imagePullPolicy: Never
|
|
ports: [{ containerPort: 80 }]
|
|
env:
|
|
- { name: ATM_KC_URL, value: "https://auth-escolinha.athleticmap.com" }
|
|
- { name: ATM_REALM, value: "athleticmap" }
|
|
- { name: ATM_CLIENT, value: "spa" }
|
|
- { name: ATM_TENANT, value: "escolinha" }
|
|
- { name: ATM_PLANO, value: "institucional" }
|
|
# P4.6 — o roteamento interno do nginx, por GRUPO de contextos.
|
|
#
|
|
# Medido em 2026-09-22: as tres estavam VAZIAS nos quatro tenants, e
|
|
# `render-config.sh` faz toda variavel ausente cair em ATM_API_URL, que
|
|
# por sua vez cai em `http://servico-bff`. Ou seja: o nginx mandaria
|
|
# `/api/cadastro` para o BFF, que responde **401** em vez da resposta do
|
|
# contexto. Hoje nada quebra porque o INGRESS atende antes, com uma linha
|
|
# por contexto — e e justamente essas linhas que P4.6 quer remover.
|
|
#
|
|
# Definidas aqui, a remocao do Ingress deixa de ser mudanca arriscada e
|
|
# vira mudanca sem efeito visivel. Enquanto o Ingress existir, estas
|
|
# variaveis nao mudam nada: o trafego nem chega a este nginx.
|
|
- { name: ATM_API_CORE_URL, value: "http://runtime-core.escolinha-prod.svc.cluster.local" }
|
|
- { name: ATM_API_OPERACAO_URL, value: "http://runtime-operacao.escolinha-prod.svc.cluster.local" }
|
|
- { name: ATM_API_SAUDE_URL, value: "http://runtime-saude.escolinha-prod.svc.cluster.local" }
|
|
- { name: ATM_BFF_URL, value: "http://servico-bff.escolinha-prod.svc.cluster.local" }
|
|
- { name: ATM_API_URL, value: "http://servico-bff.escolinha-prod.svc.cluster.local" }
|
|
resources:
|
|
requests: { cpu: 50m, memory: 64Mi }
|
|
limits: { cpu: 200m, memory: 128Mi }
|
|
volumeMounts:
|
|
- name: publico
|
|
mountPath: /usr/share/nginx/html/publico
|
|
readOnly: true
|
|
readinessProbe:
|
|
httpGet: { path: /, port: 80 }
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
volumes:
|
|
- name: publico
|
|
projected:
|
|
sources:
|
|
- configMap:
|
|
name: frontend-publico-texto
|
|
items:
|
|
- { key: "_estilo.css", path: "_estilo.css" }
|
|
- { key: "consentimento.js", path: "consentimento.js" }
|
|
- { key: "fontes--fontes.css", path: "fontes/fontes.css" }
|
|
- { key: "lp-escolinhas.css", path: "lp-escolinhas.css" }
|
|
- { key: "lp-escolinhas.html", path: "lp-escolinhas.html" }
|
|
- { key: "lp-escolinhas.js", path: "lp-escolinhas.js" }
|
|
- { key: "minha-conta.css", path: "minha-conta.css" }
|
|
- { key: "minha-conta.html", path: "minha-conta.html" }
|
|
- { key: "minha-conta.js", path: "minha-conta.js" }
|
|
- { key: "painel.css", path: "painel.css" }
|
|
- { key: "painel.html", path: "painel.html" }
|
|
- { key: "painel.js", path: "painel.js" }
|
|
- { key: "planos-modulos.json", path: "planos-modulos.json" }
|
|
- { key: "preparando.html", path: "preparando.html" }
|
|
- { key: "preparando.js", path: "preparando.js" }
|
|
- { key: "privacidade.html", path: "privacidade.html" }
|
|
- { key: "termos.html", path: "termos.html" }
|
|
- configMap:
|
|
name: frontend-publico-binario
|
|
items:
|
|
- { key: "fontes--Barlow-400-latin-ext.woff2", path: "fontes/Barlow-400-latin-ext.woff2" }
|
|
- { key: "fontes--Barlow-400-latin.woff2", path: "fontes/Barlow-400-latin.woff2" }
|
|
- { key: "fontes--Barlow-500-latin-ext.woff2", path: "fontes/Barlow-500-latin-ext.woff2" }
|
|
- { key: "fontes--Barlow-500-latin.woff2", path: "fontes/Barlow-500-latin.woff2" }
|
|
- { key: "fontes--Barlow-600-latin-ext.woff2", path: "fontes/Barlow-600-latin-ext.woff2" }
|
|
- { key: "fontes--Barlow-600-latin.woff2", path: "fontes/Barlow-600-latin.woff2" }
|
|
- { key: "fontes--Barlow-700-latin-ext.woff2", path: "fontes/Barlow-700-latin-ext.woff2" }
|
|
- { key: "fontes--Barlow-700-latin.woff2", path: "fontes/Barlow-700-latin.woff2" }
|
|
- { key: "fontes--IBMPlexMono-500-latin-ext.woff2", path: "fontes/IBMPlexMono-500-latin-ext.woff2" }
|
|
- { key: "fontes--IBMPlexMono-500-latin.woff2", path: "fontes/IBMPlexMono-500-latin.woff2" }
|
|
- { key: "fontes--Poppins-500-latin-ext.woff2", path: "fontes/Poppins-500-latin-ext.woff2" }
|
|
- { key: "fontes--Poppins-500-latin.woff2", path: "fontes/Poppins-500-latin.woff2" }
|
|
- { key: "fontes--Poppins-600-latin-ext.woff2", path: "fontes/Poppins-600-latin-ext.woff2" }
|
|
- { key: "fontes--Poppins-600-latin.woff2", path: "fontes/Poppins-600-latin.woff2" }
|
|
- { key: "fontes--Poppins-700-latin-ext.woff2", path: "fontes/Poppins-700-latin-ext.woff2" }
|
|
- { key: "fontes--Poppins-700-latin.woff2", path: "fontes/Poppins-700-latin.woff2" }
|
|
- { key: "fontes--Poppins-800-latin-ext.woff2", path: "fontes/Poppins-800-latin-ext.woff2" }
|
|
- { key: "fontes--Poppins-800-latin.woff2", path: "fontes/Poppins-800-latin.woff2" }
|
|
- { key: "img--hero-escolinha.jpg", path: "img/hero-escolinha.jpg" }
|
|
- { key: "img--logo-athletic-map.png", path: "img/logo-athletic-map.png" }
|
|
- { key: "produto-dashboard.webp", path: "produto-dashboard.webp" }
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: frontend-spa
|
|
namespace: escolinha-prod
|
|
labels:
|
|
app: frontend-spa
|
|
spec:
|
|
selector: { app: frontend-spa }
|
|
ports: [{ name: http, port: 80, targetPort: 80 }]
|