feat: sincronizar scaffold completo del shape web-backend/python
Some checks failed
__APP_NAME__ — build & deploy / build (push) Failing after 0s
__APP_NAME__ — build & deploy / helm-deploy (push) Has been skipped

Sincroniza el scaffold canónico desde templates/web-backend-python/ del
repo IDP. Reemplaza el placeholder mínimo previo (.gitea/workflows/ci.yaml,
README.md, .gitignore, catalog-info.yaml) por el scaffold completo
documentado en ADR-053 §3:

- code/ — FastAPI app con /health (db check), /metrics, /demo estático,
  middleware correlation_id, settings Pydantic, db.py con SQLAlchemy
- code/alembic/ — migración inicial vacía + env.py usando MIGRATION_DATABASE_URL
- code/tests/ — pytest + httpx TestClient (test_health, test_demo)
- helm/APP_NAME/ — chart con Deployment, Service, IngressRoute Traefik,
  NetworkPolicy, ServiceMonitor, Job alembic-upgrade como hook
  pre-upgrade,pre-install (backoffLimit: 0)
- coralware-shape.yaml — manifiesto v1alpha1 del contrato del shape
- claim-mariadb.yaml — AddonClaim declarativo (uso futuro ADR-052)
- catalog-info.yaml — entidad Backstage actualizada
- .gitea/workflows/APP_NAME-build.yaml — invoca reusable workflow ADR-038
  + job helm-deploy con KUBECONFIG_TENANT_B64

Placeholders __APP_NAME__, __TIER__, __TENANT_ID__, __TENANT_ID_NODASHES__
serán sustituidos server-side por repo-provisioner cuando materialice el
template para un tenant (pendiente — ADR-053 §11.5).

El openspec/ del golden path NO se sincroniza al repo Gitea (gobernanza
interna de Coralware).

Refs: ADR-052, ADR-053, poc-nexobms.md (PoC NexoBMS Demetrio).
This commit is contained in:
2026-05-06 17:48:13 -05:00
parent 00a801f525
commit fcec92ea1d
35 changed files with 1216 additions and 32 deletions

69
helm/APP_NAME/values.yaml Normal file
View File

@@ -0,0 +1,69 @@
# Defaults sensatos para tier startup. El CI inyecta tier/tenantId via --set
# leyendo valores del TenantProfile correspondiente.
replicaCount: 1
image:
repository: registry.coralsafety.com/__TENANT_ID_NODASHES__/__APP_NAME__
tag: latest
pullPolicy: Always
pullSecret: harbor-tenant-pull
# Identidad del tenant — populated por --set desde el CI
tenantId: ""
tenantIdNodashes: ""
tier: startup
goldenPath: web-backend
goldenPathLang: python
database:
secretName: __APP_NAME__-db-creds
config:
logLevel: INFO
correlationIdHeader: X-Correlation-ID
openapiRequireAuth: false
keycloakIssuer: ""
staticDemoPath: /app/static/demo
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
probes:
liveness:
initialDelaySeconds: 20
periodSeconds: 10
readiness:
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 3
service:
type: ClusterIP
port: 8000
ingress:
enabled: true
host: __APP_NAME__-__TENANT_ID_NODASHES__.apps.coralware.cloud
tlsSecretName: __APP_NAME__-tls
alembic:
enabled: true
command: ["alembic", "upgrade", "head"]
resources:
requests: {cpu: 50m, memory: 128Mi}
limits: {cpu: 200m, memory: 256Mi}
serviceMonitor:
enabled: true
interval: 30s
port: http
networkPolicy:
enabled: true
addonsNamespace: __TENANT_ID_NODASHES__-addons