All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- Added VITE_API_URL build arg to CI frontend build step - Updated values.yaml frontend env to include /api suffix - Updated .env.example with production URL comment - Frontend was trying to connect to localhost instead of api-brand-master.dvirlabs.com
Brand Master Helm Chart
This Helm chart deploys the Brand Master e-commerce application on Kubernetes.
Components
- Frontend: React-based UI served by Nginx
- Backend: FastAPI application
- Database: PostgreSQL 16
- Storage: 15GB PVC for product images
Prerequisites
- Kubernetes 1.19+
- Helm 3.0+
- cert-manager (for TLS certificates)
- Storage class configured (nfs-client by default)
Installation
1. Update values.yaml
Edit values.yaml and configure:
- Image repositories (if using private registry)
- Domain names for ingress
- JWT secret key (IMPORTANT!)
- Database credentials
- Storage class name
2. Install the chart
# Install in the my-apps namespace
helm install brand-master ./brand-master-chart -n my-apps --create-namespace
# Or with custom values
helm install brand-master ./brand-master-chart -n my-apps \
--set backend.jwtSecretKey=your-super-secret-key \
--set postgres.password=secure-password
3. Upgrade the chart
helm upgrade brand-master ./brand-master-chart -n my-apps
4. Uninstall
helm uninstall brand-master -n my-apps
Configuration
Key Configuration Options
| Parameter | Description | Default |
|---|---|---|
backend.image.repository |
Backend Docker image | harbor.dvirlabs.com/my-apps/brand-master-backend |
backend.image.tag |
Backend image tag | latest |
backend.jwtSecretKey |
JWT secret for authentication | your-secret-key-change-this-in-production |
backend.persistence.enabled |
Enable persistent storage for images | true |
backend.persistence.size |
Size of uploads PVC | 15Gi |
frontend.image.repository |
Frontend Docker image | harbor.dvirlabs.com/my-apps/brand-master-frontend |
frontend.image.tag |
Frontend image tag | latest |
postgres.user |
PostgreSQL username | brand_master_user |
postgres.password |
PostgreSQL password | brand_master_password |
postgres.database |
PostgreSQL database name | brand_master_db |
postgres.persistence.size |
Size of database PVC | 10Gi |
Building Docker Images
Backend
cd backend
docker build -t harbor.dvirlabs.com/my-apps/brand-master-backend:latest .
docker push harbor.dvirlabs.com/my-apps/brand-master-backend:latest
Frontend
cd frontend
docker build -t harbor.dvirlabs.com/my-apps/brand-master-frontend:latest \
--build-arg VITE_API_URL=https://api-brand-master.dvirlabs.com .
docker push harbor.dvirlabs.com/my-apps/brand-master-frontend:latest
Storage
The chart creates two PVCs:
- Database PVC: 10GB for PostgreSQL data
- Uploads PVC: 15GB for product images at
/app/uploads
Both use the nfs-client storage class by default. Update this in values.yaml if needed.
Ingress
The chart creates two ingress resources:
- Frontend:
brand-master.dvirlabs.com - Backend API:
api-brand-master.dvirlabs.com
TLS is enabled by default using Let's Encrypt via cert-manager.
Troubleshooting
Check pod status
kubectl get pods -n my-apps
View logs
# Backend logs
kubectl logs -n my-apps -l app.kubernetes.io/component=backend
# Frontend logs
kubectl logs -n my-apps -l app.kubernetes.io/component=frontend
# Database logs
kubectl logs -n my-apps -l app.kubernetes.io/component=database
Access services locally
# Frontend
kubectl port-forward -n my-apps svc/brand-master-frontend 8080:80
# Backend
kubectl port-forward -n my-apps svc/brand-master-backend 8000:8000
# Database
kubectl port-forward -n my-apps svc/brand-master-db 5432:5432
Check PVC status
kubectl get pvc -n my-apps
Security Notes
- Change the JWT secret in production
- Update database credentials
- Use strong passwords
- Configure proper CORS settings
- Review and adjust resource limits
- Enable network policies if needed
- Use image pull secrets for private registries
Support
For issues or questions, refer to the main repository documentation.