From f3da9b66c382e1b7e1eb23e00631bc6a5ae26afe Mon Sep 17 00:00:00 2001 From: dvirlabs Date: Tue, 24 Mar 2026 10:26:41 +0200 Subject: [PATCH] Add Helm chart documentation --- oramap/README.md | 169 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 oramap/README.md diff --git a/oramap/README.md b/oramap/README.md new file mode 100644 index 0000000..7693ff5 --- /dev/null +++ b/oramap/README.md @@ -0,0 +1,169 @@ +# Ora Map Helm Chart + +Helm chart for deploying Ora Map application in Kubernetes with microservices architecture. + +## Architecture + +This chart deploys two main components: + +- **Backend**: Node.js Express API server (Port 3000) +- **Frontend**: Nginx serving static files (Port 80) + +## Installation + +### Prerequisites + +- Kubernetes cluster 1.19+ +- Helm 3.0+ +- Docker images built and pushed to Harbor registry + +### Install Chart + +```bash +# From the repository root +helm install oramap ./oramap + +# Or with custom values +helm install oramap ./oramap -f custom-values.yaml + +# Install in a specific namespace +helm install oramap ./oramap -n my-namespace --create-namespace +``` + +### Upgrade Chart + +```bash +helm upgrade oramap ./oramap +``` + +### Uninstall Chart + +```bash +helm uninstall oramap +``` + +## Configuration + +The following table lists the configurable parameters and their default values: + +| Parameter | Description | Default | +|-----------|-------------|---------| +| `backend.image.repository` | Backend image repository | `harbor.dvirlabs.com/my-apps/oramap-backend` | +| `backend.image.tag` | Backend image tag | `latest` | +| `backend.replicaCount` | Number of backend replicas | `1` | +| `backend.containerPort` | Backend container port | `3000` | +| `backend.resources.limits.cpu` | Backend CPU limit | `500m` | +| `backend.resources.limits.memory` | Backend memory limit | `512Mi` | +| `frontend.image.repository` | Frontend image repository | `harbor.dvirlabs.com/my-apps/oramap-frontend` | +| `frontend.image.tag` | Frontend image tag | `latest` | +| `frontend.replicaCount` | Number of frontend replicas | `1` | +| `frontend.containerPort` | Frontend container port | `80` | +| `service.type` | Kubernetes service type | `ClusterIP` | +| `ingress.enabled` | Enable ingress | `true` | +| `ingress.className` | Ingress class name | `traefik` | +| `ingress.hosts[0].host` | Ingress hostname | `oramap.dvirlabs.com` | + +### Example Custom Values + +```yaml +# custom-values.yaml +backend: + image: + tag: "v1.0.0" + replicaCount: 3 + +frontend: + image: + tag: "v1.0.0" + replicaCount: 2 + +ingress: + hosts: + - host: oramap.example.com + paths: + - path: / + pathType: Prefix + tls: + - secretName: oramap-tls + hosts: + - oramap.example.com +``` + +## Deployment Components + +### Backend Deployment + +- Runs Express.js API server +- Health checks on `/api/health` +- Configurable resources and replicas + +### Frontend Deployment + +- Runs Nginx serving static files +- Proxies `/api/*` requests to backend service +- Uses ConfigMap for nginx configuration +- Health checks on `/` + +### Services + +- **Backend Service**: Internal ClusterIP service on port 3000 +- **Frontend Service**: ClusterIP service on port 80 (exposed via Ingress) + +### Ingress + +- Routes external traffic to frontend service +- TLS/SSL termination support +- Configurable hostname and paths + +## CI/CD Integration + +The Woodpecker CI pipeline automatically: + +1. Builds backend and frontend Docker images +2. Tags with branch name and commit SHA +3. Pushes to Harbor registry +4. Updates this chart's values in the GitOps repository + +## Accessing the Application + +After installation, the application will be available at: + +- **External**: https://oramap.dvirlabs.com (via Ingress) +- **Internal Backend API**: http://oramap-backend:3000 +- **Internal Frontend**: http://oramap-frontend:80 + +## Troubleshooting + +### Check Pod Status + +```bash +kubectl get pods -l release=oramap +``` + +### View Logs + +```bash +# Backend logs +kubectl logs -l app=oramap-backend + +# Frontend logs +kubectl logs -l app=oramap-frontend +``` + +### Check Services + +```bash +kubectl get svc -l release=oramap +``` + +### Test Backend Health + +```bash +kubectl port-forward svc/oramap-backend 3000:3000 +curl http://localhost:3000/api/health +``` + +## Version History + +- **0.2.0**: Microservices architecture with separate backend and frontend +- **0.1.0**: Initial monolithic deployment