Togglr Frontend Helm Chart
This Helm chart deploys the Togglr Feature Toggle Management System Frontend on Kubernetes.
Prerequisites
- Kubernetes 1.19+
- Helm 3.2.0+
- Togglr Backend API (deployed separately)
Installing the Chart
# Add the chart repository
helm repo add togglr https://gdrocha-io.github.io/togglr-helm-charts
helm repo update
# Install with default values
helm install togglr-frontend togglr/togglr-frontend
# Install with custom values
helm install togglr-frontend togglr/togglr-frontend -f values.yaml
Configuration
The following table lists the configurable parameters and their default values.
Application Configuration
| Parameter |
Description |
Default |
app.apiUrl |
Backend API URL |
http://togglr-backend:8080/api/v1 |
app.domain |
Application domain |
http://localhost:3000 |
Deployment Configuration
| Parameter |
Description |
Default |
replicaCount |
Number of replicas |
1 |
image.repository |
Image repository |
gdrocha/togglr-frontend |
image.tag |
Image tag |
latest |
image.pullPolicy |
Image pull policy |
IfNotPresent |
resources.limits.cpu |
CPU limit |
500m |
resources.limits.memory |
Memory limit |
512Mi |
resources.requests.cpu |
CPU request |
250m |
resources.requests.memory |
Memory request |
256Mi |
Service Configuration
| Parameter |
Description |
Default |
service.type |
Service type |
ClusterIP |
service.port |
Service port |
80 |
Ingress Configuration
| Parameter |
Description |
Default |
ingress.enabled |
Enable ingress |
false |
ingress.className |
Ingress class name |
"" |
ingress.hosts[0].host |
Hostname |
togglr.local |
ingress.tls |
TLS configuration |
[] |
Autoscaling Configuration
| Parameter |
Description |
Default |
autoscaling.enabled |
Enable HPA |
false |
autoscaling.minReplicas |
Minimum replicas |
1 |
autoscaling.maxReplicas |
Maximum replicas |
10 |
autoscaling.targetCPUUtilizationPercentage |
CPU target |
80 |
Examples
Basic Installation
# values-basic.yaml
ingress:
enabled: true
className: "nginx"
hosts:
- host: togglr.example.com
paths:
- path: /
pathType: Prefix
Production Configuration
# values-production.yaml
replicaCount: 1
ingress:
enabled: true
className: "nginx"
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
hosts:
- host: togglr.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: togglr-frontend-tls
hosts:
- togglr.example.com
resources:
limits:
cpu: 1000m
memory: 1Gi
requests:
cpu: 500m
memory: 512Mi
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 70
Installation Examples
Complete Stack Installation
# Install backend first
helm install togglr-backend togglr/togglr-backend \
--set postgresql.enabled=true \
--set app.jwt.secret="$(openssl rand -base64 32)"
# Wait for backend to be ready
kubectl wait --for=condition=ready pod -l app.kubernetes.io/name=togglr-backend --timeout=300s
# Install frontend
helm install togglr-frontend togglr/togglr-frontend -f {path}/values.yaml
Health Checks
The frontend container includes health checks:
- Liveness Probe: HTTP GET on port 80
- Readiness Probe: HTTP GET on port 80
- Startup Probe: HTTP GET on port 80 with extended timeout
Troubleshooting
Common Issues
- Backend Connection Issues
# Check if backend is accessible
kubectl exec -it deployment/togglr-frontend -- wget -qO- http://togglr-backend:8080/actuator/health
- Ingress Not Working
# Check ingress controller logs
kubectl logs -n ingress-nginx deployment/ingress-nginx-controller
- Pod Not Starting
# Check pod logs
kubectl logs deployment/togglr-frontend
# Check pod events
kubectl describe pod -l app.kubernetes.io/name=togglr-frontend
Uninstalling
helm uninstall togglr-frontend
Contributing
- Make changes to the chart
- Update version in
Chart.yaml
- Test with
helm lint ./charts/togglr-frontend
- Package with
helm package ./charts/togglr-frontend