# Invy Helm Chart This Helm chart deploys the Invy wedding guest list management application on Kubernetes. ## Prerequisites - Kubernetes 1.19+ - Helm 3.0+ - Persistent Volume provisioner support in the underlying infrastructure (for PostgreSQL) - Ingress controller (Traefik recommended) - Cert-manager (for TLS certificates) ## Components This chart deploys the following components: - **Frontend**: React + Vite application (Nginx) - **Backend**: FastAPI application - **Database**: PostgreSQL 16 ## Installation ### Add the chart repository (if applicable) ```bash helm repo add invy https://your-helm-repo.com helm repo update ``` ### Install the chart ```bash # Install with default values helm install invy ./invy-chart -n my-apps --create-namespace # Install with custom values helm install invy ./invy-chart -n my-apps --create-namespace -f custom-values.yaml ``` ## Configuration The following table lists the configurable parameters and their default values. ### Global Parameters | Parameter | Description | Default | |-----------|-------------|---------| | `global.namespace` | Namespace for all resources | `my-apps` | | `global.imagePullSecrets` | Image pull secrets | `[]` | ### Backend Parameters | Parameter | Description | Default | |-----------|-------------|---------| | `backend.image.repository` | Backend image repository | `harbor.dvirlabs.com/my-apps/invy-backend` | | `backend.image.tag` | Backend image tag | `latest` | | `backend.replicaCount` | Number of backend replicas | `1` | | `backend.service.port` | Backend service port | `8000` | | `backend.ingress.enabled` | Enable backend ingress | `true` | | `backend.ingress.hosts[0].host` | Backend ingress hostname | `api-invy.dvirlabs.com` | ### Frontend Parameters | Parameter | Description | Default | |-----------|-------------|---------| | `frontend.image.repository` | Frontend image repository | `harbor.dvirlabs.com/my-apps/invy-frontend` | | `frontend.image.tag` | Frontend image tag | `latest` | | `frontend.replicaCount` | Number of frontend replicas | `1` | | `frontend.service.port` | Frontend service port | `80` | | `frontend.env.VITE_API_URL` | Backend API URL | `https://api-invy.dvirlabs.com` | | `frontend.ingress.enabled` | Enable frontend ingress | `true` | | `frontend.ingress.hosts[0].host` | Frontend ingress hostname | `invy.dvirlabs.com` | ### PostgreSQL Parameters | Parameter | Description | Default | |-----------|-------------|---------| | `postgres.user` | PostgreSQL user | `invy_user` | | `postgres.password` | PostgreSQL password | `invy_password` | | `postgres.database` | PostgreSQL database name | `invy_db` | | `postgres.persistence.enabled` | Enable persistence | `true` | | `postgres.persistence.size` | Persistent volume size | `10Gi` | | `postgres.persistence.storageClass` | Storage class | `nfs-client` | ## Building and Pushing Images ### Backend Image ```bash cd backend docker build -t harbor.dvirlabs.com/my-apps/invy-backend:latest . docker push harbor.dvirlabs.com/my-apps/invy-backend:latest ``` ### Frontend Image ```bash cd frontend docker build --build-arg VITE_API_URL=https://api-invy.dvirlabs.com -t harbor.dvirlabs.com/my-apps/invy-frontend:latest . docker push harbor.dvirlabs.com/my-apps/invy-frontend:latest ``` ## Upgrading ```bash helm upgrade invy ./invy-chart -n my-apps ``` ## Uninstalling ```bash helm uninstall invy -n my-apps ``` ## Customization Create a `custom-values.yaml` file to override default values: ```yaml backend: image: tag: "v1.0.0" ingress: hosts: - host: api.mycompany.com paths: - path: / pathType: Prefix frontend: image: tag: "v1.0.0" env: VITE_API_URL: "https://api.mycompany.com" ingress: hosts: - host: invy.mycompany.com paths: - path: / pathType: Prefix postgres: password: "your-secure-password" persistence: storageClass: "your-storage-class" ``` Then install with: ```bash helm install invy ./invy-chart -n my-apps -f custom-values.yaml ``` ## Troubleshooting ### Check pod status ```bash kubectl get pods -n my-apps ``` ### View pod logs ```bash # 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 the database ```bash kubectl exec -it -n my-apps invy-db-0 -- psql -U invy_user -d invy_db ``` ## Support For issues and feature requests, please open an issue in the repository.