Skip to content

Kubernetes (Helm)

nitrohook includes a Helm chart in charts/ that deploys the full stack: API server, fan-out workers, Postgres, and Redis.

Terminal window
helm install nitrohook ./charts \
--set api.ingress.host=nitrohook.example.com
ComponentKindReplicas
API serverDeployment1 (configurable)
Fan-out workerDeployment3 (configurable)
PostgreSQLStatefulSet1
RedisStatefulSet1
IngressIngress1 (optional)

The API deployment runs database migrations as an init container before starting.

image:
api:
repository: ghcr.io/zachbroad/nitrohook-api
tag: main
worker:
repository: ghcr.io/zachbroad/nitrohook-worker
tag: main
api:
replicaCount: 1
migration:
enabled: true
ingress:
enabled: true
className: nginx
host: nitrohook.test
tls: []
# - secretName: nitrohook-tls
# hosts:
# - nitrohook.test
worker:
replicaCount: 3
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi

These go into a ConfigMap and map to the same environment variables as Docker Compose:

appConfig:
port: "8080"
workerConcurrency: "4"
maxRetries: "5"
retryBaseDelay: "5s"
deliveryTimeout: "10s"
pollInterval: "30s"
postgres:
user: relay
password: relay
database: nitrohook
storage: 5Gi
storageClass: ""
redis:
storage: 1Gi
storageClass: ""

By default the chart creates a Secret with the database and Redis connection strings. To use an existing secret:

secret:
create: false
existingSecret: my-nitrohook-secret

The secret must contain DATABASE_URL and REDIS_URL keys.

With ingress enabled, DNS resolution depends on your setup:

  • minikube — enable the ingress-dns addon to automatically resolve *.test domains to your minikube IP:
    Terminal window
    minikube addons enable ingress
    minikube addons enable ingress-dns
  • Cloud / bare metal — point your DNS record at the ingress controller’s external IP.

Without ingress:

Terminal window
kubectl port-forward svc/nitrohook-api 8080:80
open http://localhost:8080