This directory packages Serge's web app (reviewbot-web) for Kubernetes.
The Helm chart is intentionally self-contained and values-driven so a team can
deploy it into its own cluster without changing application code.
helm/contains the Helm chart for the web app: Deployment, Service, ConfigMap, optional Ingress, optional ServiceAccount, and a PersistentVolumeClaim.helm/env/prod.yamlcontains the production values used forserge.huggingface.techon the open-source EKS cluster.helm/serge-secrets.example.yamlis a template for the sensitive runtime env. Copy it tohelm/serge-secrets.yaml, fill it locally, and never commit it.scripts/deploy.shchecks the current Kubernetes context, creates the namespace when needed, optionally applies a local Secret file, and runs Helm.scripts/logs.shfinds the current running Serge pod and prints recent logs.
Serge uses embedded SQLite for review/task history. The chart therefore runs a
single replica with a Recreate rollout strategy and mounts a PVC at
persistence.mountPath (/var/lib/reviewbot by default). WEB_STORE_PATH is
set to <mountPath>/jobs.db, so the database survives pod restarts.
The container runs as a non-root user, drops Linux capabilities, uses
RuntimeDefault seccomp, and sets fsGroup so the app user can write the
volume. Sensitive values are loaded from a pre-created Secret via
existingSecret; non-secret runtime config lives in envVars.
Create or update the Secret in the target namespace:
cp deploy/helm/serge-secrets.example.yaml deploy/helm/serge-secrets.yaml
$EDITOR deploy/helm/serge-secrets.yaml
deploy/scripts/deploy.sh -n serge --secret-file deploy/helm/serge-secrets.yamlDeploy without applying a Secret file, assuming serge-secrets already exists:
deploy/scripts/deploy.sh -n serge -f deploy/helm/env/prod.yamlUse --context when you want the script to refuse any other kube context:
deploy/scripts/deploy.sh \
--context infra:opensource-aws-use1-prod-54 \
-n serge \
-f deploy/helm/env/prod.yamlFetch recent logs:
deploy/scripts/logs.sh \
--context infra:opensource-aws-use1-prod-54 \
-n serge \
--since 2h \
--grep 'error|traceback|crashed|HTTPError'Print only the latest error block:
deploy/scripts/logs.sh \
--context infra:opensource-aws-use1-prod-54 \
-n serge \
--since 2h \
--last-error- The production image is published to GHCR as
ghcr.io/huggingface/serge. HELPER_SANDBOX=requireneeds nodes that allow unprivileged user namespaces. Set it toautooroffinenvVarsif the cluster cannot support that.- Avoid
kubectl applyfor filled Secret manifests long-term: it can store plaintext Secret values in thelast-applied-configurationannotation. The helper strips that annotation after applying a Secret file.