feat(healthz): worker count check + configurable config path #2

Merged
haedong merged 5 commits from feat/healthz-worker-count-and-config-path into main 2026-05-15 13:27:31 +09:00
Owner

Summary

  • Worker count check: expected_min_count / expected_max_count fields for process check
    • 0 = disabled (backward compatible, existence-only)
    • Cross-field validation: min > max triggers ConfigFatalError at startup
  • Config path env-var chain: replaces hardcoded /etc/healthz/config.yaml
    • HEALTHZ_HOME (default: /opt/healthz)
    • HEALTHZ_CONF_DIR (default: $HEALTHZ_HOME/conf)
    • HEALTHZ_CONF_FILE_NAME (default: healthz.yaml)
    • --config CLI flag still overrides everything
  • validate.py bugfix: d["kind"]d.get("kind") KeyError on kustomization.yaml
  • Report: _reports/healthz-sidecar-report.md (concept, architecture, work process, constraints, samples)

Changed files (14)

Area Files Change
Source schema.py, loader.py, process.py, main.py worker count + config path
Container Dockerfile ENV vars, CMD, dir structure
Manifests 20-configmap, 30-statefulset, healthz_config /opt/healthz/conf/healthz.yaml
Helm values, configmap.tpl, statefulset.tpl templated config path
Docs README.md, _reports/ updated references + report
Scripts validate.py KeyError fix + fallback key

Test plan

  • Config loader round-trip (default 0/0, explicit min/max, min>max rejection)
  • ProcessCheck.run_once() — below min, above max, in range, boundary, legacy 0/0
  • Config path resolution — all 5 env-var scenarios
  • validate.py 4-phase pass (0 errors, 0 warnings)
  • 10/10 simulations passed

🤖 Generated with Claude Code

## Summary - **Worker count check**: `expected_min_count` / `expected_max_count` fields for process check - 0 = disabled (backward compatible, existence-only) - Cross-field validation: min > max triggers ConfigFatalError at startup - **Config path env-var chain**: replaces hardcoded `/etc/healthz/config.yaml` - `HEALTHZ_HOME` (default: `/opt/healthz`) - `HEALTHZ_CONF_DIR` (default: `$HEALTHZ_HOME/conf`) - `HEALTHZ_CONF_FILE_NAME` (default: `healthz.yaml`) - `--config` CLI flag still overrides everything - **validate.py bugfix**: `d["kind"]` → `d.get("kind")` KeyError on kustomization.yaml - **Report**: `_reports/healthz-sidecar-report.md` (concept, architecture, work process, constraints, samples) ## Changed files (14) | Area | Files | Change | |------|-------|--------| | Source | schema.py, loader.py, process.py, main.py | worker count + config path | | Container | Dockerfile | ENV vars, CMD, dir structure | | Manifests | 20-configmap, 30-statefulset, healthz_config | `/opt/healthz/conf/healthz.yaml` | | Helm | values, configmap.tpl, statefulset.tpl | templated config path | | Docs | README.md, _reports/ | updated references + report | | Scripts | validate.py | KeyError fix + fallback key | ## Test plan - [x] Config loader round-trip (default 0/0, explicit min/max, min>max rejection) - [x] ProcessCheck.run_once() — below min, above max, in range, boundary, legacy 0/0 - [x] Config path resolution — all 5 env-var scenarios - [x] validate.py 4-phase pass (0 errors, 0 warnings) - [x] 10/10 simulations passed 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Add pseudo FastAPI application under app_works/pseudo/ with:
- Config loader with string-only coercion (healthz pattern)
- Structured JSON logging with size + daily log rotation
- RFC 7807 exception handlers
- Connection pool manager (lifespan managed)
- Request ID / access log middleware
- K8s manifests with healthz sidecar
- Annotated config files (v1 + v2)

Verified: 10/10 tests passed, deployed on apitest namespace.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generated documentation (concept, manual, HA test sheet, annotated
manifests) is managed separately from the source tree.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Nextcloud 백그라운드 작업(파일 스캔, 정리 등)을 위한 cron sidecar 컨테이너 추가.
동일 이미지로 /cron.sh 엔트리포인트 실행, nextcloud-html 볼륨 공유.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Process check: expected_min_count/expected_max_count for worker count validation
  (0 = disabled, backward compatible with existence-only check)
- Config path: env-var chain HEALTHZ_HOME/HEALTHZ_CONF_DIR/HEALTHZ_CONF_FILE_NAME
  (default: /opt/healthz/conf/healthz.yaml, replaces /etc/healthz/config.yaml)
- Update Dockerfile, manifests (raw + Helm), README accordingly
- Fix validate.py KeyError on kustomization.yaml (d["kind"] -> d.get("kind"))
- Add detailed report (_reports/healthz-sidecar-report.md)

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!2
No description provided.