- Updated Helm repository URL to use git.commandware.com - Fixed production values to use git.commandware.com as image registry - Corrected domain references to match actual infrastructure
150 lines
3.4 KiB
Markdown
150 lines
3.4 KiB
Markdown
# API7 Enterprise Edition Helm Chart
|
|
|
|
This Helm chart deploys the API7 Enterprise Edition demo application, consisting of a Web frontend and API backend service.
|
|
|
|
## Prerequisites
|
|
|
|
- Kubernetes 1.19+
|
|
- Helm 3.8.0+
|
|
- PV provisioner support in the underlying infrastructure (optional)
|
|
- Ingress controller (e.g., NGINX Ingress Controller)
|
|
|
|
## Installation
|
|
|
|
### Add the Helm repository (if published)
|
|
|
|
```bash
|
|
helm repo add api7ee https://git.commandware.com/api/packages/demos/helm
|
|
helm repo update
|
|
```
|
|
|
|
### Install the chart
|
|
|
|
```bash
|
|
# Install with default values
|
|
helm install my-api7ee ./helm/api7ee
|
|
|
|
# Install in a specific namespace
|
|
helm install my-api7ee ./helm/api7ee --namespace api7ee --create-namespace
|
|
|
|
# Install with custom values file
|
|
helm install my-api7ee ./helm/api7ee -f custom-values.yaml
|
|
```
|
|
|
|
## Configuration
|
|
|
|
### Key Configuration Options
|
|
|
|
| Parameter | Description | Default |
|
|
|-----------|-------------|---------|
|
|
| `web.enabled` | Enable Web component | `true` |
|
|
| `web.replicaCount` | Number of Web replicas | `2` |
|
|
| `web.image.repository` | Web image repository | `api7ee/web` |
|
|
| `web.image.tag` | Web image tag | `main` |
|
|
| `web.service.port` | Web service port | `8000` |
|
|
| `api.enabled` | Enable API component | `true` |
|
|
| `api.replicaCount` | Number of API replicas | `3` |
|
|
| `api.image.repository` | API image repository | `api7ee/api` |
|
|
| `api.image.tag` | API image tag | `main` |
|
|
| `api.service.port` | API service port | `8080` |
|
|
| `ingress.enabled` | Enable ingress | `true` |
|
|
| `ingress.hosts[0].host` | Ingress hostname | `demo.commandware.it` |
|
|
|
|
### Custom Values Examples
|
|
|
|
#### Using a private registry:
|
|
|
|
```yaml
|
|
global:
|
|
imageRegistry: my-registry.example.com
|
|
imagePullSecrets:
|
|
- name: my-registry-secret
|
|
```
|
|
|
|
#### Enabling autoscaling:
|
|
|
|
```yaml
|
|
web:
|
|
autoscaling:
|
|
enabled: true
|
|
minReplicas: 2
|
|
maxReplicas: 10
|
|
targetCPUUtilizationPercentage: 70
|
|
```
|
|
|
|
#### Custom resource limits:
|
|
|
|
```yaml
|
|
api:
|
|
resources:
|
|
limits:
|
|
cpu: 2000m
|
|
memory: 2Gi
|
|
requests:
|
|
cpu: 1000m
|
|
memory: 1Gi
|
|
```
|
|
|
|
## Upgrading
|
|
|
|
```bash
|
|
# Upgrade to a new version
|
|
helm upgrade my-api7ee ./helm/api7ee
|
|
|
|
# Upgrade with new values
|
|
helm upgrade my-api7ee ./helm/api7ee --set web.replicaCount=3
|
|
```
|
|
|
|
## Uninstallation
|
|
|
|
```bash
|
|
# Uninstall the release
|
|
helm uninstall my-api7ee
|
|
|
|
# Uninstall from a specific namespace
|
|
helm uninstall my-api7ee --namespace api7ee
|
|
```
|
|
|
|
## Monitoring
|
|
|
|
If metrics are enabled, the services expose Prometheus-compatible metrics:
|
|
|
|
```yaml
|
|
metrics:
|
|
enabled: true
|
|
serviceMonitor:
|
|
enabled: true
|
|
interval: 30s
|
|
```
|
|
|
|
## Troubleshooting
|
|
|
|
### Check deployment status:
|
|
```bash
|
|
kubectl get deployments -l app.kubernetes.io/instance=my-api7ee
|
|
```
|
|
|
|
### View logs:
|
|
```bash
|
|
# Web component logs
|
|
kubectl logs -l app.kubernetes.io/instance=my-api7ee,app.kubernetes.io/component=web
|
|
|
|
# API component logs
|
|
kubectl logs -l app.kubernetes.io/instance=my-api7ee,app.kubernetes.io/component=api
|
|
```
|
|
|
|
### Check HPA status:
|
|
```bash
|
|
kubectl get hpa -l app.kubernetes.io/instance=my-api7ee
|
|
```
|
|
|
|
## Security Considerations
|
|
|
|
- Pod Security Context is configured to run as non-root user (UID 1000)
|
|
- Security Context drops all capabilities and prevents privilege escalation
|
|
- Read-only root filesystem is enabled
|
|
- Network policies can be enabled to restrict traffic
|
|
|
|
## Support
|
|
|
|
For issues and questions, please contact support@commandware.com or visit https://git.commandware.com/demos/api7-demo |