395 lines
9.5 KiB
JSON
395 lines
9.5 KiB
JSON
{
|
|
"version": "1.1",
|
|
"id": "platform-request-path",
|
|
"title": "요청 하나가 지나는 다섯 홉",
|
|
"question": "바깥에서 온 HTTPS 요청 하나는 어느 홉을 거쳐 어느 파드와 어느 저장소에 닿는가?",
|
|
"type": "deployment",
|
|
"direction": "LR",
|
|
"audience": [
|
|
"플랫폼 운영자",
|
|
"이 클러스터에 서비스를 새로 붙이려는 개발자"
|
|
],
|
|
"summary": "공개 인터넷·LAN·Tailscale에서 온 요청은 호스트의 Nginx 한 곳에서만 TLS가 끊기고, loopback NodePort 하나를 통해 클러스터로 들어간 뒤 Host 기반 Ingress 다섯 갈래로 나뉜다. Gitea와 Keycloak만 공용 PostgreSQL로 이어진다.",
|
|
"alt": "왼쪽의 클라이언트에서 출발한 화살표가 호스트 경계 안의 Host Nginx를 지나 k3s 클러스터 경계 안의 Traefik으로 들어가고, Traefik에서 다섯 서비스로 갈라진 뒤 그 가운데 Gitea와 Keycloak만 공용 PostgreSQL로 이어지는 구조도.",
|
|
"long_description": "클라이언트는 공개 인터넷, LAN 192.168.0.0/24, Tailscale 100.64.0.0/10 세 출발지를 가진다. 요청은 호스트 경계 안의 Host Nginx 443으로 들어가고 여기서만 TLS가 종료된다. Host Nginx는 관리 hostname에 source allowlist를 적용하고 forwarded header를 다시 쓴 뒤 loopback 127.0.0.1:30080 하나로만 넘긴다. k3s 클러스터 경계 안의 Traefik은 NodePort 30080을 kube-proxy nodeport-addresses=127.0.0.0/8로 loopback에 묶고, web entrypoint에서 10.42.0.1/32만 forwarded-header 신뢰 프록시로 인정한다. 거기서 Host 기반 Ingress 다섯 건이 Gitea, Keycloak, AIStor Console, pgAdmin, Grafana로 갈라진다. 상태 계층에서는 Gitea와 Keycloak만 공용 PostgreSQL의 read-write Service 5432로 이어지며, 이 Service에는 Ingress도 NodePort도 LoadBalancer도 없다.",
|
|
"source_context": {
|
|
"document": "docs/platform-infra/final/document.md",
|
|
"document_sha256": "2831219e5510d6eff44e36eb652d6e63637490c23e193c9134510dad1d6bf226",
|
|
"anchor": {
|
|
"kind": "heading",
|
|
"value": "2. 한 장으로 보는 전체 구조",
|
|
"line": 88
|
|
}
|
|
},
|
|
"composition": {
|
|
"profile": "component-flow",
|
|
"diagram_only": true,
|
|
"reference_ids": [
|
|
"payment-event-flow"
|
|
],
|
|
"rationale": "본문 §2.1이 클라이언트에서 저장소까지 한 방향 요청 경로를 다섯 홉으로 못 박고 있으므로 directed request path 문법이 그대로 맞는다. 호스트와 클러스터라는 두 소유 경계는 group으로만 표현하고 흐름 자체는 하나의 방향으로 유지한다.",
|
|
"focus_node": "traefik"
|
|
},
|
|
"groups": [
|
|
{
|
|
"id": "host-zone",
|
|
"label": "호스트",
|
|
"kind": "system",
|
|
"role": "zone",
|
|
"evidence": [
|
|
{
|
|
"start_line": 98,
|
|
"end_line": 100
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "cluster-zone",
|
|
"label": "k3s 클러스터",
|
|
"kind": "system",
|
|
"role": "zone",
|
|
"evidence": [
|
|
{
|
|
"start_line": 104,
|
|
"end_line": 121
|
|
},
|
|
{
|
|
"start_line": 150,
|
|
"end_line": 160
|
|
}
|
|
],
|
|
"assumption": false
|
|
}
|
|
],
|
|
"nodes": [
|
|
{
|
|
"id": "client",
|
|
"label": "클라이언트",
|
|
"kind": "external",
|
|
"role": "source",
|
|
"shape": "box",
|
|
"details": [
|
|
"공개 인터넷",
|
|
"LAN 192.168.0.0/24",
|
|
"Tailscale 100.64.0.0/10"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 93,
|
|
"end_line": 94
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "host-nginx",
|
|
"label": "Host Nginx",
|
|
"kind": "service",
|
|
"role": "service",
|
|
"group": "host-zone",
|
|
"details": [
|
|
"TLS 종료 :443",
|
|
"source allowlist",
|
|
"ssl_reject_handshake"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 98,
|
|
"end_line": 100
|
|
}
|
|
],
|
|
"assumption": false,
|
|
"emphasis": "primary",
|
|
"shape": "box"
|
|
},
|
|
{
|
|
"id": "traefik",
|
|
"label": "Traefik",
|
|
"kind": "service",
|
|
"role": "service",
|
|
"group": "cluster-zone",
|
|
"details": [
|
|
"NodePort 30080 (loopback)",
|
|
"web trust 10.42.0.1/32"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 104,
|
|
"end_line": 106
|
|
}
|
|
],
|
|
"assumption": false,
|
|
"emphasis": "primary",
|
|
"shape": "box"
|
|
},
|
|
{
|
|
"id": "gitea",
|
|
"label": "Gitea",
|
|
"kind": "service",
|
|
"role": "service",
|
|
"group": "cluster-zone",
|
|
"details": [
|
|
"gitea-http:3000",
|
|
"공개 DNS 있음"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 111,
|
|
"end_line": 111
|
|
},
|
|
{
|
|
"start_line": 134,
|
|
"end_line": 134
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "grafana",
|
|
"label": "Grafana",
|
|
"kind": "service",
|
|
"role": "service",
|
|
"group": "cluster-zone",
|
|
"details": [
|
|
"grafana:80",
|
|
"LAN + Tailscale"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 115,
|
|
"end_line": 115
|
|
},
|
|
{
|
|
"start_line": 136,
|
|
"end_line": 136
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "keycloak",
|
|
"label": "Keycloak",
|
|
"kind": "security",
|
|
"role": "service",
|
|
"group": "cluster-zone",
|
|
"details": [
|
|
"keycloak-service:8080",
|
|
"공개 DNS 있음"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 112,
|
|
"end_line": 112
|
|
},
|
|
{
|
|
"start_line": 135,
|
|
"end_line": 135
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "aistor-console",
|
|
"label": "AIStor Console",
|
|
"kind": "service",
|
|
"role": "service",
|
|
"group": "cluster-zone",
|
|
"details": [
|
|
"minio-aistor-console:9090",
|
|
"LAN + Tailscale"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 113,
|
|
"end_line": 113
|
|
},
|
|
{
|
|
"start_line": 137,
|
|
"end_line": 137
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "pgadmin",
|
|
"label": "pgAdmin",
|
|
"kind": "service",
|
|
"role": "service",
|
|
"group": "cluster-zone",
|
|
"details": [
|
|
"pgadmin:80",
|
|
"LAN + Tailscale"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 114,
|
|
"end_line": 114
|
|
},
|
|
{
|
|
"start_line": 138,
|
|
"end_line": 138
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "postgres",
|
|
"label": "platform-postgres-rw",
|
|
"kind": "database",
|
|
"role": "store",
|
|
"shape": "database",
|
|
"group": "cluster-zone",
|
|
"details": [
|
|
":5432",
|
|
"gitea DB",
|
|
"keycloak DB",
|
|
"ClusterIP 전용"
|
|
],
|
|
"evidence": [
|
|
{
|
|
"start_line": 119,
|
|
"end_line": 119
|
|
},
|
|
{
|
|
"start_line": 142,
|
|
"end_line": 144
|
|
}
|
|
],
|
|
"assumption": false
|
|
}
|
|
],
|
|
"edges": [
|
|
{
|
|
"id": "e-client-nginx",
|
|
"from": "client",
|
|
"to": "host-nginx",
|
|
"label": "HTTPS 443",
|
|
"kind": "request",
|
|
"evidence": [
|
|
{
|
|
"start_line": 93,
|
|
"end_line": 98
|
|
}
|
|
],
|
|
"assumption": false,
|
|
"emphasis": "primary"
|
|
},
|
|
{
|
|
"id": "e-nginx-traefik",
|
|
"from": "host-nginx",
|
|
"to": "traefik",
|
|
"label": "127.0.0.1:30080",
|
|
"kind": "request",
|
|
"evidence": [
|
|
{
|
|
"start_line": 102,
|
|
"end_line": 104
|
|
}
|
|
],
|
|
"assumption": false,
|
|
"emphasis": "primary"
|
|
},
|
|
{
|
|
"id": "e-traefik-gitea",
|
|
"from": "traefik",
|
|
"to": "gitea",
|
|
"label": "git",
|
|
"kind": "request",
|
|
"evidence": [
|
|
{
|
|
"start_line": 108,
|
|
"end_line": 111
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "e-traefik-grafana",
|
|
"from": "traefik",
|
|
"to": "grafana",
|
|
"label": "grafana",
|
|
"kind": "request",
|
|
"evidence": [
|
|
{
|
|
"start_line": 108,
|
|
"end_line": 115
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "e-traefik-keycloak",
|
|
"from": "traefik",
|
|
"to": "keycloak",
|
|
"label": "id",
|
|
"kind": "request",
|
|
"evidence": [
|
|
{
|
|
"start_line": 108,
|
|
"end_line": 112
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "e-traefik-aistor",
|
|
"from": "traefik",
|
|
"to": "aistor-console",
|
|
"label": "storage-admin",
|
|
"kind": "request",
|
|
"evidence": [
|
|
{
|
|
"start_line": 108,
|
|
"end_line": 113
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "e-traefik-pgadmin",
|
|
"from": "traefik",
|
|
"to": "pgadmin",
|
|
"label": "db-admin",
|
|
"kind": "request",
|
|
"evidence": [
|
|
{
|
|
"start_line": 108,
|
|
"end_line": 114
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "e-gitea-postgres",
|
|
"from": "gitea",
|
|
"to": "postgres",
|
|
"label": "5432",
|
|
"kind": "data",
|
|
"evidence": [
|
|
{
|
|
"start_line": 118,
|
|
"end_line": 119
|
|
}
|
|
],
|
|
"assumption": false
|
|
},
|
|
{
|
|
"id": "e-keycloak-postgres",
|
|
"from": "keycloak",
|
|
"to": "postgres",
|
|
"label": "5432",
|
|
"kind": "data",
|
|
"evidence": [
|
|
{
|
|
"start_line": 118,
|
|
"end_line": 119
|
|
}
|
|
],
|
|
"assumption": false
|
|
}
|
|
],
|
|
"legend": [],
|
|
"metadata": {}
|
|
}
|