feat: pseudo API + metrics + health + annotations #3

Merged
haedong merged 6 commits from dev into main 2026-05-15 16:08:19 +09:00
Owner

pseudo API, /health, /metrics, HPA, healthz sidecar, Korean annotations. 10/10 tests passed.

pseudo API, /health, /metrics, HPA, healthz sidecar, Korean annotations. 10/10 tests passed.
- /health: simple status with APPLICATION_NAME
- /health/workers: configured/active/idle worker counts via /proc scan
- /health/detail: full diagnostics (workers + datasource connectivity)
- HPA: scale on worker count < 2, CPU > 80%, memory > 80%
- Secret + envsubst init container for datasource passwords
- setproctitle: "pseudo: master" / "pseudo: worker [pid=N]" for pgrep
- ConfigMap resources_config v1 structure (type -> identifier)
- resources_config_v2.yaml kept as alternative (identifier -> type)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- /health shows datasource connectivity summary:
  OK + "all connected" / UP + failed names / OK + "none configured"
- All JSON responses use pretty print (indent=2)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pseudo:
- /metrics endpoint: workers (gauge) + HTTP requests/errors/latency (counter/gauge)
- MetricsCollectorMiddleware: per-request count, status, latency collection
- Prometheus scrape annotations on Deployment
- HPA: CPU/Memory primary + pseudo_workers_idle secondary (fallback-safe)
- Pretty JSON response for all endpoints

healthz:
- Config path resolution via HEALTHZ_HOME/CONF_DIR/CONF_FILE_NAME env vars
- Process check: expected_min_count/expected_max_count support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- coercion.py: 섹션별 역할 주석 (Guards, Coercion 함수별)
- errors.py: 에러 계층 주석
- schema.py: dataclass 섹션 주석
- loader.py: docstring 한국어 변환

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
haedong/cloudnative!3
No description provided.