91 lines
2.7 KiB
Markdown
91 lines
2.7 KiB
Markdown
# Helm Chart Update Summary
|
|
|
|
## Overview
|
|
The Helm chart has been updated to deploy a complete dating app with PostgreSQL, backend API, and frontend on Kubernetes.
|
|
|
|
## Architecture
|
|
|
|
### Components Deployed:
|
|
1. **PostgreSQL StatefulSet** - Database for the application
|
|
- 1 replica (configurable)
|
|
- 10Gi persistent volume
|
|
- Headless service for StatefulSet operations
|
|
|
|
2. **Backend Deployment** - FastAPI application
|
|
- 2 replicas (configurable)
|
|
- Exposed via ClusterIP service on port 8000
|
|
- Health checks enabled (readiness & liveness probes)
|
|
|
|
3. **Frontend Deployment** - React application
|
|
- 2 replicas (configurable)
|
|
- Exposed via ClusterIP service on port 80
|
|
- Health checks enabled (readiness & liveness probes)
|
|
|
|
### Ingresses (2):
|
|
1. **Backend Ingress**
|
|
- Host: `api-dateme.dvirlabs.com`
|
|
- Routes to: backend service port 8000
|
|
|
|
2. **Frontend Ingress**
|
|
- Host: `dateme.dvirlabs.com`
|
|
- Routes to: frontend service port 80
|
|
|
|
## Domain Configuration
|
|
|
|
| Component | Domain | Type |
|
|
|-----------|--------|------|
|
|
| Frontend | dateme.dvirlabs.com | Ingress |
|
|
| Backend API | api-dateme.dvirlabs.com | Ingress |
|
|
| Database | postgres.dating-app.svc.cluster.local | Internal Service |
|
|
|
|
## Frontend to Backend Communication
|
|
|
|
The frontend is configured to call the backend via the ingress domain:
|
|
- **VITE_API_URL**: `https://api-dateme.dvirlabs.com`
|
|
|
|
This environment variable is injected via ConfigMap into the frontend deployment.
|
|
|
|
## CORS Configuration
|
|
|
|
The backend is configured to accept requests from:
|
|
- `http://localhost:5173` (dev)
|
|
- `http://localhost:3000` (dev)
|
|
- `http://localhost` (dev)
|
|
- `https://dateme.dvirlabs.com` (production frontend)
|
|
|
|
## Database Connection
|
|
|
|
Backend connects to PostgreSQL via:
|
|
```
|
|
postgresql://dating_app_user:Aa123456@postgres.dating-app.svc.cluster.local:5432/dating_app
|
|
```
|
|
|
|
## Deployment Commands
|
|
|
|
```bash
|
|
# Install the chart
|
|
helm install dating-app ./helm/dating-app
|
|
|
|
# Upgrade the chart
|
|
helm upgrade dating-app ./helm/dating-app
|
|
|
|
# With custom values
|
|
helm install dating-app ./helm/dating-app -f values-production.yaml
|
|
```
|
|
|
|
## Prerequisites
|
|
|
|
1. **Kubernetes Cluster** with NGINX Ingress Controller
|
|
2. **DNS Configuration** - Point domains to your Kubernetes ingress controller:
|
|
- `dateme.dvirlabs.com` → Ingress IP
|
|
- `api-dateme.dvirlabs.com` → Ingress IP
|
|
3. **SSL/TLS Certificates** (optional, configure via annotations)
|
|
|
|
## Notes
|
|
|
|
- All components are deployed in the `dating-app` namespace
|
|
- Storage class defaults to cluster default if not specified
|
|
- Update `JWT_SECRET` in production values
|
|
- Adjust replica counts and resource limits based on your cluster capacity
|
|
- PostgreSQL credentials are in the ConfigMap (use external secrets in production)
|