feat: cashews cache, app_ metrics, /docs swagger #4

Open
haedong wants to merge 27 commits from dev into main
Owner
  • cashews disk cache (worker shared, no Redis)
  • metrics renamed pseudo_ -> app_ (reusable)
  • cache metrics: app_cache_hits/misses/hit_ratio/keys
  • Swagger UI at /docs
  • 8/8 inspection passed
- cashews disk cache (worker shared, no Redis) - metrics renamed pseudo_ -> app_ (reusable) - cache metrics: app_cache_hits/misses/hit_ratio/keys - Swagger UI at /docs - 8/8 inspection passed
- cashews + diskcache: disk:// backend for shared cache across workers
- /health datasource check cached (30s TTL)
- /health/detail datasource check cached (15s TTL)
- Prometheus metrics renamed: pseudo_ -> app_ (generic, reusable)
- Added cache metrics: app_cache_hits, misses, hit_ratio, keys
- Swagger UI enabled at /docs
- HPA metric renamed: app_workers_idle

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Full operation manual (_reports/pseudo_api_manual.md)
- 14 chapters: overview, architecture, config, endpoints, cache,
  exception handling, logging, secret injection, healthz sidecar,
  HPA, deployment, troubleshooting, verification results
- Wiki.js compatible: ASCII diagrams, {.dense} tables, section numbering
- Metrics renamed: pseudo_ -> app_ (generic prefix)
- Swagger /docs enabled

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
19개 exporter/collector 포함 통합 sidecar 이미지.
Rocky Linux 9 base, /opt/apps/NAME_VER → /opt/NAME 디렉터리 컨벤션.
각 컴포넌트별 독립 entrypoint.sh, sample config, template 제공.

Components: alloy, fluent-bit, node/mysqld/postgres/kafka/mongodb/
sql/oracledb/redis/rabbitmq/ceph/squid/blackbox/process/snmp/
elasticsearch/nginx exporters, jmx_exporter

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>
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>
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>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
snapshot/compare/restore 워크플로우로 16개 카테고리 자동 비교.
Helm release 백업, --include-secrets 옵션, 타임스탬프 디렉터리 지원.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- standalone_inspector: CLI single binary (Go), kubeconform + built-in type check
  auto-download schemas on first run, --online/--update-schemas flags
- inspector_web: web UI (Go HTTP + vanilla JS), paste/upload/drag-drop,
  inspect + auto-fix (indent, flow→block), copy/download, dark mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bash→Python3 전환: jq 의존성 제거, argparse CLI, exit code 지원.
--snapshot/--compare/--restore/--status/--list 옵션 체계.
bash 스크립트(k8s-upgrade-check.sh)는 레거시로 유지.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- rows 미정의 NameError 수정 (PVC/PV 섹션)
- restore 성공/실패 판정 오류 수정 (run check=True)
- StorageClass 복원 결과 보고 추가
- 노드 conditions 안전 접근 (.get())
- --dry-run 시 kubectl --dry-run=server 사용 (서버 검증)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
standalone_k8s_upgrade_checker: 기존 CLI 도구 (Python/Bash)
web_k8s_upgrade_checker: Flask 기반 웹 서비스
- Dashboard: 노드/워크로드/스토리지/네트워크/Helm 현황
- Snapshot: 클러스터 상태 저장 (단일 보관, 덮어쓰기)
- Inspect: 스냅샷 vs 현재 상태 16개 카테고리 비교 리포트
- Restore: 매니페스트 기반 복원 (dry-run=server/live)
- Download: 스냅샷 tar.gz 다운로드

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Deployments: Structured view (NS→App→CM/SVC/Ingress/HPA/PVC/Pods)
- Deployments: Flat view (테이블)
- YAML Viewer: 리소스 클릭 시 YAML 보기 + 다운로드
- Rollout Restart: Deployment/StatefulSet 재시작 (확인 모달)
- Restore: 체크박스로 복원 대상 선택, 전체/개별 선택 지원

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- restore 실패 시 stderr/stdout/exitcode detail 토글 표시
- run_detail() 함수 추가 (stdout+stderr+returncode 캡처)
- Flat view에 체크박스 추가, 선택된 YAML 일괄 다운로드
- escapeHtml/toggleDetail 유틸리티

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- command injection 방지: _sanitize() 입력 검증 추가
- CSS: --cyan 변수 누락, NS 접기/펼치기, Inspect 리포트 접기
- replicas 기본값 0→1 (K8s 기본값 반영)
- URL 파라미터 encodeURIComponent 적용
- 미사용 변수/파라미터 정리

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- generate_report(): 스냅샷 vs 현재 상태 side-by-side 비교 Markdown
- Report 탭: 웹에서 렌더링 (간이 MD→HTML 변환)
- Download: .md 파일 다운로드
- 변경 항목 CHANGED/REMOVED/NEW/WARN bold 표시

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- renderMarkdown 첫 데이터 행 누락 수정 (isHeader 로직 제거)
- request.json None 방어 (malformed JSON body)
- structured view replicas 기본값 0→1
- dead code 모달 HTML 정리

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Manual Verification Commands 섹션: 23개 kubectl/helm 명령어와 기대 결과.
유지보수 담당자가 리포트 다운로드 후 수동으로 각 항목을 직접 확인 가능.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kube-state-metrics 기반 20개 패널:
- Summary: 노드/Deploy/Pod/PVC 상태 stat 8개
- Nodes: info 테이블 + readiness 타임라인
- Deployments: desired vs ready 테이블 + unhealthy 그래프
- StatefulSets/DaemonSets: 레플리카 테이블
- Storage: PVC status + size bar gauge
- Pods: phase pie chart + restarts + waiting/terminated
- Endpoints not ready + HPA current vs desired
- Node resources: CPU/Memory allocatable vs requests

Grafana Import → Upload JSON으로 적용

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
요구사항, 아키텍처, 컴포넌트(웹/CLI/Grafana), 점검항목 16개,
Structured View 구조, Report 포맷, API 목록, 보안 정리.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin dev:dev
git switch dev

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff dev
git switch dev
git rebase main
git switch main
git merge --ff-only dev
git switch dev
git rebase main
git switch main
git merge --no-ff dev
git switch main
git merge --squash dev
git switch main
git merge --ff-only dev
git switch main
git merge dev
git push origin main
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!4
No description provided.