Architecture: cost optimisation, blue-green deployment, reduce to 3 projects
Helm Chart CI & Release / Lint Helm Chart (push) Failing after 1s
Helm Chart CI & Release / Semantic Release (push) Has been skipped

- Reduce from 4 to 3 GCP projects (drop sandbox, use staging namespaces)
- Add blue-green deployment strategy via Argo Rollouts
- Add cost optimisation section with monthly estimate (~$175-245)
- Add blue-green flow diagram and cost pie chart to HLD

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-19 20:32:30 +00:00
parent 25d4610903
commit edc552413e
2 changed files with 110 additions and 25 deletions
+42 -8
View File
@@ -9,22 +9,25 @@ flowchart TB
end
subgraph GCP["Google Cloud Platform"]
subgraph Projects["Project Structure"]
subgraph Projects["Project Structure (3 projects)"]
Prod[company-inc-prod]
Staging[company-inc-staging]
Staging[company-inc-staging<br/>QA + dev namespaces]
Shared[company-inc-shared]
Sandbox[company-inc-sandbox]
end
subgraph Edge["Edge / Networking"]
LB[Cloud Load Balancer<br/>HTTPS · TLS termination]
CDN[Cloud CDN<br/>Static Assets]
NAT[Cloud NAT<br/>Egress]
NAT[Cloud NAT<br/>Egress · shared]
end
subgraph VPC["VPC — Private Subnets"]
subgraph GKE["GKE Autopilot Cluster"]
Ingress[Ingress Controller]
subgraph BlueGreen["Blue-Green Deployment"]
Green[Green — stable<br/>receives traffic]
Blue[Blue — new release<br/>smoke tests]
end
subgraph Workloads
API[Backend — Python / Flask<br/>HPA · 23 replicas]
SPA[Frontend — React SPA<br/>Nginx]
@@ -44,14 +47,17 @@ flowchart TB
subgraph CICD["CI / CD"]
Git[Git Repository]
Actions[Gitea / GitHub Actions<br/>Build · Test · Scan]
Argo[ArgoCD / Flux<br/>GitOps Deploy]
Argo[ArgoCD + Argo Rollouts<br/>GitOps · Blue-Green]
end
Users --> LB
Users --> CDN
LB --> Ingress
CDN --> SPA
Ingress --> API
Ingress -->|traffic| Green
Ingress -.->|after switch| Blue
Green --> API
Blue --> API
Ingress --> SPA
API --> Redis
API --> Mongo
@@ -64,6 +70,24 @@ flowchart TB
Argo --> GKE
```
## Blue-Green Deployment Flow
```mermaid
flowchart LR
subgraph Cluster["GKE Cluster"]
LB[Load Balancer<br/>Service Selector]
Green[Green — v1.2.0<br/>current stable]
Blue[Blue — v1.3.0<br/>new release]
end
Deploy[ArgoCD<br/>Argo Rollouts] -->|deploy new version| Blue
Blue -->|smoke tests| Check{Tests pass?}
Check -->|yes| LB
LB -->|switch 100%| Blue
Check -->|no| Rollback[Rollback<br/>keep Green]
LB -.->|instant rollback| Green
```
## CI / CD Pipeline
```mermaid
@@ -72,8 +96,8 @@ flowchart LR
Repo -->|webhook| CI[CI Pipeline<br/>lint · test · build]
CI -->|push image| Registry[Artifact Registry]
CI -->|update manifests| GitOps[GitOps Repo]
GitOps -->|sync| Argo[ArgoCD / Flux]
Argo -->|deploy| GKE[GKE Cluster]
GitOps -->|sync| Argo[ArgoCD]
Argo -->|blue-green deploy| GKE[GKE Cluster]
```
## Network Security Layers
@@ -86,3 +110,13 @@ flowchart TD
NP --> Pods[Application Pods<br/>Private IPs only]
Pods --> PE[Private Endpoint<br/>MongoDB Atlas]
```
## Cost Profile (Early Stage)
```mermaid
pie title Monthly Cost Breakdown (~$200)
"GKE Autopilot" : 120
"MongoDB Atlas M10" : 60
"LB + NAT" : 30
"Registry + Secrets" : 5
```