@@ -23,6 +23,8 @@ Deploy the full **MCP Gateway Stack**-MCP Context Forge gateway, PostgreSQL, Red
23
23
24
24
## Architecture
25
25
26
+ High-level architecture:
27
+
26
28
```
27
29
┌─────────────────────────────┐
28
30
│ NGINX Ingress │
@@ -41,6 +43,123 @@ Deploy the full **MCP Gateway Stack**-MCP Context Forge gateway, PostgreSQL, Red
41
43
└──────────┘ └──────────┘
42
44
```
43
45
46
+ Chart design:
47
+
48
+ ``` mermaid
49
+ graph TB
50
+ %% External Access
51
+ Ingress[🌐 NGINX Ingress<br/>gateway.local]
52
+
53
+ %% Pre-deployment Job
54
+ subgraph "Database Migration"
55
+ MigrationJob[🔄 Migration Job<br/>Alembic upgrade head<br/>Runs before Gateway<br/>CPU: 100m-200m<br/>Memory: 256Mi-512Mi<br/>Restart: Never, Max 3 retries]
56
+ end
57
+
58
+ %% Application Tier
59
+ subgraph "Application Layer"
60
+ MCPGateway[🚪 MCP Gateway<br/>Replicas: 2<br/>Port: 4444<br/>CPU: 100m-200m<br/>Memory: 512Mi-1024Mi]
61
+ FastTimeServer[⏰ Fast Time Server<br/>Replicas: 2<br/>Port: 8080<br/>CPU: 25m-50m<br/>Memory: 10Mi-64Mi]
62
+ HPA{📈 Auto Scaling<br/>Min: 2, Max: 10<br/>CPU/Memory: 90%}
63
+ end
64
+
65
+ %% Management UIs
66
+ subgraph "Management UIs - Optional"
67
+ PgAdmin[📊 PgAdmin<br/>Postgres Web UI<br/>Port: 80<br/>CPU: 100m-200m<br/>Memory: 128Mi-256Mi]
68
+ RedisCommander[🔧 Redis Commander<br/>Redis Web UI<br/>Port: 8081<br/>CPU: 50m-100m<br/>Memory: 128Mi-256Mi]
69
+ end
70
+
71
+ %% Configuration Management
72
+ subgraph "Configuration"
73
+ GatewayConfig[(📄 Gateway ConfigMap<br/>~40 app settings)]
74
+ GatewaySecret[(🔐 Gateway Secret<br/>Auth & JWT keys)]
75
+ PostgresConfig[(📄 Postgres ConfigMap<br/>Database name)]
76
+ PostgresSecret[(🔐 Postgres Secret<br/>DB credentials)]
77
+ end
78
+
79
+ %% Data & State Management
80
+ subgraph "Data & State"
81
+ PostgreSQL[(🗄️ PostgreSQL 17<br/>Port: 5432<br/>CPU: 500m-1000m<br/>Memory: 64Mi-1Gi<br/>MCP Server configs)]
82
+ Redis[(🔄 Redis<br/>Port: 6379<br/>CPU: 50m-100m<br/>Memory: 16Mi-256Mi<br/>Sessions & Cache)]
83
+ PVC[(💾 Persistent Volume<br/>5Gi RWX Storage<br/>PostgreSQL data)]
84
+ end
85
+
86
+ %% Services Layer
87
+ subgraph "Services (ClusterIP)"
88
+ GatewaySvc[🔗 Gateway Service<br/>Port: 80]
89
+ FastTimeSvc[🔗 Fast Time Service<br/>Port: 80]
90
+ PostgresSvc[🔗 Postgres Service<br/>Port: 5432]
91
+ RedisSvc[🔗 Redis Service<br/>Port: 6379]
92
+ PgAdminSvc[🔗 PgAdmin Service<br/>Port: 80]
93
+ RedisCommanderSvc[🔗 Redis Commander Service<br/>Port: 8081]
94
+ end
95
+
96
+ %% Network Connections
97
+ Ingress --> GatewaySvc
98
+ Ingress -.->|/fast-time| FastTimeSvc
99
+ GatewaySvc --> MCPGateway
100
+ FastTimeSvc --> FastTimeServer
101
+
102
+ %% Migration Flow (Sequential)
103
+ MigrationJob -->|Waits for DB ready| PostgresSvc
104
+ MigrationJob -->|Runs before| MCPGateway
105
+
106
+ %% Application to Services
107
+ MCPGateway --> PostgresSvc
108
+ MCPGateway --> RedisSvc
109
+ PostgresSvc --> PostgreSQL
110
+ RedisSvc --> Redis
111
+
112
+ %% UI Connections
113
+ PgAdminSvc --> PgAdmin
114
+ RedisCommanderSvc --> RedisCommander
115
+ PgAdmin --> PostgresSvc
116
+ RedisCommander --> RedisSvc
117
+
118
+ %% Configuration Injection
119
+ GatewayConfig --> MCPGateway
120
+ GatewaySecret --> MCPGateway
121
+ PostgresConfig --> PostgreSQL
122
+ PostgresSecret --> PostgreSQL
123
+ PostgresSecret --> PgAdmin
124
+ PostgresSecret --> MigrationJob
125
+
126
+ %% Storage
127
+ PostgreSQL --> PVC
128
+
129
+ %% Auto Scaling
130
+ HPA -.-> MCPGateway
131
+
132
+ %% Health Checks (dotted lines)
133
+ MCPGateway -.->|/health<br/>/ready| MCPGateway
134
+ FastTimeServer -.->|/health| FastTimeServer
135
+ PostgreSQL -.->|pg_isready| PostgreSQL
136
+ Redis -.->|PING| Redis
137
+ PgAdmin -.->|/misc/ping| PgAdmin
138
+ RedisCommander -.->|HTTP root| RedisCommander
139
+ MigrationJob -.->|db_isready.py| PostgreSQL
140
+
141
+ %% Deployment Order (optional visual cue)
142
+ PostgreSQL -.->|Must be ready first| MigrationJob
143
+ MigrationJob -.->|Must complete first| MCPGateway
144
+
145
+ %% Styling
146
+ classDef app fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
147
+ classDef migration fill:#fff3e0,stroke:#ef6c00,stroke-width:3px
148
+ classDef ui fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
149
+ classDef config fill:#fff8e1,stroke:#f57c00,stroke-width:2px
150
+ classDef data fill:#f1f8e9,stroke:#388e3c,stroke-width:2px
151
+ classDef service fill:#e0f2f1,stroke:#00695c,stroke-width:2px
152
+ classDef network fill:#fce4ec,stroke:#c2185b,stroke-width:2px
153
+
154
+ class MCPGateway,FastTimeServer,HPA app
155
+ class MigrationJob migration
156
+ class PgAdmin,RedisCommander ui
157
+ class GatewayConfig,GatewaySecret,PostgresConfig,PostgresSecret config
158
+ class PostgreSQL,Redis,PVC data
159
+ class GatewaySvc,FastTimeSvc,PostgresSvc,RedisSvc,PgAdminSvc,RedisCommanderSvc service
160
+ class Ingress network
161
+ ```
162
+
44
163
---
45
164
46
165
## Prerequisites
0 commit comments