---
config:
theme: base
htmlLabels: false
flowchart:
htmlLabels: false
themeVariables:
darkMode: false
textColor: "#0f172a"
primaryTextColor: "#0f172a"
secondaryTextColor: "#0f172a"
tertiaryTextColor: "#0f172a"
lineColor: "#64748b"
edgeLabelBackground: "#ffffff"
---
flowchart TB
Admin["`**주인장 · 관리자**`"]
Commenter["`**댓글 게시자**
브라우저`"]
subgraph GitHub["GitHub"]
Blog["`**blog repo**
Markdown·첨부`"]
Code["`**anyflow-blog repo**
코드·Makefile·배포 YAML`"]
Comments["`**comments repo**
비공개 · 댓글·Like·공개 데이터`"]
subgraph Actions["GitHub Actions · GitHub 제공 runner"]
Build["`**빌드 workflow**
정적 콘텐츠·컨테이너 이미지 생성`"]
Publish["`**댓글 게시 workflow**
PR·승인·공개 데이터 생성`"]
end
GHCR["`**GHCR**
웹·댓글 API·배포 도구 이미지`"]
end
subgraph Home["홈 서버 · Kubernetes"]
Cron["`**배포 CronJob**
1분 주기
emptyDir에 clone → make deploy`"]
Gateway["`**public-gateway**
agentgateway
블로그 HTTPRoute·요청 제한`"]
Web["`**nginx**
웹 Deployment · Service:80
정적 콘텐츠가 포함된 이미지`"]
API["`**댓글 Deployment**
Node.js:3000 · Service:80
API·단일 비동기 처리기`"]
PVC[("`**댓글 PVC**
영속 큐·로컬 Git checkout`")]
end
Admin -->|"D1a. 글 push"| Blog
Admin -->|"D1b. 코드·설정 push"| Code
Blog -->|"D2a. workflow_dispatch·콘텐츠 checkout"| Build
Code -->|"D2b. 코드·workflow checkout"| Build
Build -->|"D3. 이미지 push"| GHCR
Build -->|"D4. 이미지 digest로 YAML 갱신·push"| Code
GHCR -->|"D5. 배포 도구 이미지 준비"| Cron
Code -->|"D6. 매 실행 새 clone"| Cron
Cron -->|"D7a. 웹 Service·Deployment 적용"| Web
Cron -->|"D7b. 댓글 Service·Deployment 적용"| API
Cron -->|"D7c. HTTPRoute·요청 제한 정책 적용"| Gateway
GHCR -->|"D8a. 웹 이미지 pull"| Web
GHCR -->|"D8b. API 이미지 pull"| API
Commenter -.->|"C1. 페이지·댓글·Like 요청"| Gateway
Gateway -.->|"C2a. 일반 경로 → Service:80"| Web
Gateway -.->|"C2b. /api → Service:80"| API
API -->|"C3. 영속 큐 저장·접수 완료"| PVC
API -.->|"C4. 비동기 Git push"| Comments
Comments -->|"C5. push로 workflow 실행"| Publish
Publish -->|"C6. PR·merge·공개 데이터 commit"| Comments
Comments -.->|"C7. Git pull·조회 상태 갱신"| API
classDef actor fill:#f1f5f9,stroke:#64748b,color:#0f172a
classDef repo fill:#dbeafe,stroke:#2563eb,color:#1e3a8a
classDef action fill:#ede9fe,stroke:#7c3aed,color:#4c1d95
classDef registry fill:#cffafe,stroke:#0891b2,color:#164e63
classDef service fill:#dcfce7,stroke:#16a34a,color:#14532d
classDef gateway fill:#fef9c3,stroke:#ca8a04,color:#713f12
classDef storage fill:#ffedd5,stroke:#ea580c,color:#7c2d12
class Admin,Commenter actor
class Blog,Code,Comments repo
class Build,Publish,Cron action
class GHCR registry
class Web,API service
class Gateway gateway
class PVC storage
style GitHub fill:#f8fafc,stroke:#94a3b8,color:#0f172a
style Actions fill:#faf5ff,stroke:#a78bfa,color:#4c1d95
style Home fill:#f0fdf4,stroke:#86b996,color:#14532d