Skip to content
Hibouhibou

Kubernetes Deployment

A Helm chart is provided in chart/hibou/ for Kubernetes deployments.

  • Kubernetes 1.27+
  • Helm 3.12+
  • A PostgreSQL 18+ instance (bundled or external)
  1. Create the namespace

    Terminal window
    kubectl create namespace hibou
  2. Create the database secret

    The database connection string is stored in a Kubernetes Secret — credentials never appear in Helm values.

    When using the chart’s built-in PostgreSQL, pass the password at install time:

    Terminal window
    helm install hibou ./chart/hibou -n hibou \
    --set postgresql.auth.password=changeme

    The chart generates a Secret with the full connection URL automatically.

  3. Verify the deployment

    Terminal window
    kubectl -n hibou rollout status deployment hibou
    kubectl -n hibou get pods

All Hibou settings are passed via the ConfigMap and Secret. No credentials are stored in values.yaml.

hibou:
image:
repository: ghcr.io/hibouhq/hibou
tag: latest
replicas: 1
logging:
level: info # debug, info, warn, error
format: json # console, json
database:
url: "" # Override to skip secret entirely (not recommended)
trivy:
url: "" # Auto-discovered when trivy.enabled=true
advisory:
cache:
ttl: "6h" # How long advisory query results are cached
osv:
url: "https://api.osv.dev"
postgresql:
enabled: true # Set false for external database
auth:
existingSecret: "" # Name of a Secret with key: url
username: hibou
password: "" # Required via --set when existingSecret is empty
database: hibou
trivy:
enabled: true
ingress:
enabled: false
hostname: "" # Required when ingress is enabled
className: ""
annotations: {}
tls:
enabled: false
existingSecret: ""

A full-history secret scan of the default branch covers all branches. A manual scan of another branch covers that branch only; push scans with a commit range remain incremental. If secret_scan.timeout expires, the job is terminal on its first timeout rather than automatically repeating the same scan. Its error names the configured timeout. Lost claims and shutdown cancellation are not classified as scan timeouts.

For a large first baseline, tune the timeout and worker resources based on measurements. For example:

hibou:
secretScan:
enabled: true
timeout: 4h
worker:
enabled: true
background:
secretScan: true
scratch:
sizeLimit: 10Gi
resources:
limits:
cpu: "4"
memory: 4Gi
ephemeral-storage: 12Gi

These are starting estimates, not guarantees or new defaults. After changing the deployment, request one scan on the default branch, not simultaneous retries on multiple branches.

The chart defaults give PostgreSQL 2Gi memory (512MB shared_buffers, 1536MB effective_cache_size, 2 CPUs) and the API pod 1 CPU / 1Gi memory. Once the database grows past ~1 GB (for example, repositories with hundreds of tracked refs and thousands of components), keep the working set in memory so repository pages do not stall on cold disk reads:

postgresql: # or cnpg.cluster
resources:
requests:
cpu: 500m
memory: 2Gi
limits:
cpu: "2"
memory: 4Gi
parameters:
shared_buffers: 1GB
effective_cache_size: 3GB
work_mem: 16MB
random_page_cost: "1.1"

Back PostgreSQL with SSD/NVMe storage (storageClass); slow networked volumes (20–45 ms per 8 kB read) turn any cache miss into multi-second page loads.

Repository removal uses a bounded 15-minute operation context independent of client disconnects and the ordinary HTTP request timeout. Its transaction raises only its own PostgreSQL statement timeout; other pooled queries keep their existing limit. Migration 00085 indexes the cascade foreign keys that made large removals exceed 60 seconds.

A proxy may time out while deletion continues. Refresh the repository list before retrying or enrolling the same repository: the name and forge identity become available after commit, not when the client connection closes. Active deployments still block removal; inactive history requires explicit purge consent. Incidents remain detached with the removed repository name, and artifact cleanup occurs only after deletion commits.

The Secret must contain a single key:

Key Description
url Full PostgreSQL connection string (postgres://user:pass@host:5432/db?sslmode=...)

When using existingSecret, the chart reads the secret name from postgresql.auth.existingSecret and mounts the url key as HIBOU_DATABASE_URL.

Enable ingress for external access:

Terminal window
helm install hibou ./chart/hibou -n hibou \
--set postgresql.auth.password=changeme \
--set ingress.enabled=true \
--set ingress.hostname=hibou.example.com \
--set ingress.className=nginx

For TLS with cert-manager:

Terminal window
helm install hibou ./chart/hibou -n hibou \
--set postgresql.auth.password=changeme \
--set ingress.enabled=true \
--set ingress.hostname=hibou.example.com \
--set ingress.className=nginx \
--set ingress.tls.enabled=true \
--set 'ingress.annotations.cert-manager\.io/cluster-issuer=letsencrypt-prod'

For TLS with an existing secret:

Terminal window
--set ingress.tls.enabled=true \
--set ingress.tls.existingSecret=my-tls-secret

Hibou serves Prometheus metrics, including storage usage (database, tables, artifacts), on a dedicated port, 9090 by default. The ingress never forwards that port, so /metrics is reachable only inside the cluster. Admins can see the same storage numbers without a metrics stack under Settings → Storage.

hibou:
metrics:
# Scrape with the Prometheus Operator (the VictoriaMetrics operator converts it too)
podMonitor:
enabled: true
labels:
release: kube-prometheus-stack
# Require a bearer token (Secret key "token"); the PodMonitor sends it
auth:
existingSecret: hibou-metrics-token
# Only the monitoring namespace may reach the metrics port
networkPolicy:
enabled: true
from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: monitoring

Set hibou.metrics.enabled=false to turn /metrics off entirely.

Terminal window
helm upgrade hibou ./chart/hibou -n hibou \
--set postgresql.auth.password=changeme

Hibou runs database migrations automatically on startup.

Terminal window
helm uninstall hibou -n hibou