Helm chartv0.1.1App 1.0.1MITVerified publisher

A Lighthouse CI server for storing, reviewing and comparing Lighthouse reports.

About this chart

Ad Noctem Collective - lhci Helm Chart

Lighthouse CI Server stores historical Lighthouse reports and provides dashboards and build comparisons. This chart uses Ad Noctem's LHCI container, version 1.0.1, containing upstream LHCI 0.15.1. appVersion tracks the container release.

The optional Bitnami PostgreSQL and MySQL subcharts are provided for convenience. Their Helm packages remain available under oci://registry-1.docker.io/bitnamicharts, but the original bitnami/* container tags may no longer be available following the catalog changes. This chart does not integrate Bitnami Secure Images. Use your own compatible image mirror, an external database, or preferably an operator-managed database such as CloudNativePG for production. Helm chart repositories and container image repositories are separate settings. See Bitnami's catalog announcement.

Head to the container repository and upstream configuration reference for further documentation.

✨ TL;DR

Helm Repository Installation

helm repo add adnoctem https://adnoctem.github.io/charts
helm install lhci adnoctem/lhci --version 0.1.0

OCI Installation

helm install lhci oci://ghcr.io/adnoctem/charts/lhci --version 0.1.0

Introduction

The default installation creates a single-replica Deployment, Service, ServiceAccount and a 5 GiB PVC for SQLite. A default StorageClass must be available, or configure persistence.storageClass / persistence.existingClaim. Ingress and PodDisruptionBudget are optional. No Kubernetes API permissions are needed, and service account tokens are not mounted. The image runs as UID/GID 10001 with a read-only root filesystem and writable data and temporary volumes.

All supported LHCI server configuration has dedicated values. SQLite, PostgreSQL and MySQL use storageMethod: sql; Spanner is not implemented upstream. The chart preserves the container's environment bootstrap and database wait logic. Scalar options use environment variables; structured Sequelize and cron options use a native lighthouserc.yaml in the ConfigMap. The chart supplies configuration only: it does not override the container entrypoint or ship runtime scripts. The image's *_FILE inputs handle external database URIs and basic-auth credentials. Subchart passwords, PSI API keys and database TLS material use native LHCI environment variables populated from Kubernetes Secret references.

Workloads and persistence

kind: Deployment is the default. Its default Recreate strategy stops the previous pod before starting the next, so SQLite has only one application writer during a normal rollout. kind: StatefulSet is also supported through a shared pod specification and a governing headless Service. Neither workload kind makes SQLite safe for multiple replicas; replicaCount must remain 1 with SQLite. External SQL can use either workload type.

Both workloads mount the same standalone SQLite PVC. Reports survive pod deletion, rescheduling when the storage supports it, and upgrades. persistence.keep: true retains chart-created SQLite claims on uninstall. Back up the database before upgrades; retention does not replace backups. After uninstall, reuse the retained claim with persistence.existingClaim when reinstalling. Existing claims are never managed by this chart. Disabling persistence uses emptyDir and loses reports on pod replacement.

SQLite files must remain inside persistence.mountPath (default /data). External SQL uses an emptyDir for the container's home directory and creates no LHCI data claim; database subcharts manage their own PVCs. Changing the workload kind or backend requires a planned migration and does not move report data automatically. Do not run both workload kinds against the same SQLite file during migration. Database PVC retention follows the selected database subchart's behavior.

The server initializes/migrates its schema at startup. Keep sqlDangerouslyResetDatabase: false: enabling it deletes all LHCI data on every startup. For external SQL, start with one replica for initial schema creation and upgrades. Increase replicas only after migration completes, and do not enable built-in cron jobs on multiple replicas; they have no distributed scheduling lock.

Database configuration

External PostgreSQL and CloudNativePG

Keep both subcharts disabled. An existing Secret with a full connection URI is the preferred integration; the Secret must be in the release namespace. For a CNPG application Secret containing uri:

lhci:
  storage:
    sqlDialect: postgres
    existingSecret:
      name: lhci-db-app
      key: uri

CNPG's operator remains responsible for creating the database, credentials, backups, replication and upgrades. A MySQL operator or an independently managed MySQL server uses the same interface with sqlDialect: mysql. The URI must include the protocol, credentials, host, port if nonstandard, and database name. Percent-encode reserved characters in credentials before placing a URI in a Secret. sqlConnectionUrl can create a chart-managed Secret for development, but its value is then also stored in Helm release history.

Database TLS

Supply a CA and optional client certificate/private key from a Secret. Kubernetes injects their contents through native LHCI environment variables into Sequelize's SSL configuration. certKey and keyKey must be configured together. Set caKey: "" to use the runtime's trust store.

lhci:
  storage:
    sqlDialect: postgres
    existingSecret:
      name: lhci-db-app
      key: uri
    tls:
      existingSecret: lhci-db-client-tls
      caKey: ca.crt
      certKey: tls.crt
      keyKey: tls.key
      rejectUnauthorized: true

Avoid conflicting SSL settings in the URI, sqlDialectOptions.ssl and storage.tls; storage.tls replaces the dialect's SSL object when enabled. Keep hostname/certificate verification enabled for production. sqlConnectionSsl exposes upstream's boolean switch; use the explicit TLS configuration when providing custom certificates.

Optional Bitnami subcharts

Enable one subchart to select its LHCI dialect automatically. Do not also provide an external database URI/Secret. Both subcharts default to standalone topology. Configure images that are compatible with the dependency's entrypoint, paths, probes and UID requirements: Docker Official Images are not drop-in replacements for Bitnami containers.

postgresql:
  enabled: true
  auth:
    username: lhci
    database: lhci
    existingSecret: lhci-postgresql-credentials

For PostgreSQL, the Secret requires password and postgres-password by default; key names are configurable via postgresql.auth.secretKeys. MySQL uses mysql-password and mysql-root-password:

mysql:
  enabled: true
  auth:
    username: lhci
    database: lhci
    existingSecret: lhci-mysql-credentials

Without auth.existingSecret, the subchart uses supplied passwords or generates them. LHCI receives the actual application password from that Secret through LHCI_STORAGE__SEQUELIZE_OPTIONS__PASSWORD. The generated connection URI contains only the host, port and database; the username and password are separate native Sequelize options. Passwords containing :, @, /, ?, # and % therefore need no URI escaping. Database service names, ports and fullnameOverride are resolved from the selected dependency. Use the dedicated postgresql.auth.* / mysql.auth.* values rather than global authentication overrides.

In container 1.0.1, upstream yargs coerces numeric-looking nested environment values to numbers. Use nonnumeric application usernames/passwords with subcharts (including existing Secrets). A full external URI avoids this password coercion. This limitation applies to container 1.0.1.

The dependencies follow this repository's Bitnami OCI conventions (postgresql ~15.5, mysql ~11.1). Their original image tags are retained as defaults, but availability must be checked before enabling them. Override image.registry, image.repository, image.tag and optionally image.digest under the dependency for a compatible mirror.

Authentication and ingress

Basic auth is off by default, matching upstream. Enable it for access through an untrusted network:

lhci:
  basicAuth:
    enabled: true
    existingSecret:
      name: lhci-basic-auth
      usernameKey: username
      passwordKey: password
ingress:
  enabled: true
  className: nginx
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: "10m"
  hosts:
    - host: lhci.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: lhci-tls
      hosts:
        - lhci.example.com

Serve LHCI at a hostname root; upstream has no base-path setting. Configure your ingress controller's upload limit to allow Lighthouse report JSON (the server permits 10 MB). The example annotation is specific to ingress-nginx. Basic auth protects the UI and API; /healthz deliberately remains unauthenticated. Probes verify the HTTP server and startup initialization, not continued database availability. The default startup allowance is ten minutes; increase it if database wait retries/timeouts are raised substantially.

Scheduled collection and retention

Configure lhci.psiCollectCron.sites after creating the referenced projects. Each entry requires projectSlug, schedule and urls; optional fields are label, branch, numberOfRuns, maxNumberOfParallelUrls, strategy (mobile/desktop) and categories. lhci.psiCollectCron.psiApiEndpoint exposes a custom upstream endpoint and cachebustTimeoutMs controls the delay between repeated runs. Keep replicaCount: 1 when either built-in scheduler is enabled.

lhci:
  psiCollectCron:
    existingSecret:
      name: lhci-psi
      key: apiKey
    sites:
      - projectSlug: example
        label: Production
        urls:
          - https://example.com
        schedule: "0 * * * *"
        numberOfRuns: 3
        maxNumberOfParallelUrls: 1
        strategy: mobile
        categories:
          - performance
  deleteOldBuildsCron:
    - schedule: "0 0 * * *"
      maxAgeInDays: 30
      skipBranches:
        - main

Retention entries accept skipBranches and onlyBranches arrays. Omit onlyBranches to consider all branches; an empty onlyBranches: [] matches none. Retention permanently removes matching old builds.

lhci.storage.sqlDialectOptions and sequelizeOptions are native option objects for TLS, driver options and connection pools. Keep credentials out of these ConfigMap-backed objects. Socket-only database connections cannot satisfy the image's TCP wait logic; use a reachable TCP URI. Embedding LHCI in another Express server is outside this container chart's scope; normally leave useBodyParser: true. Global CLI help/version/config-discovery flags are not server settings: the chart owns LHCI_CONFIG. extraEnvVars, extraEnvVarsSecret and extraEnvVarsConfigMap are escape hatches for Node.js runtime settings such as NODE_OPTIONS and DEBUG, not substitutes for the dedicated server values. Avoid overriding chart-managed environment names.

Chart-managed configuration/Secret changes trigger a rollout. Existing Secret changes require a manual rollout, including operator-managed credential rotation; neither LHCI nor its entrypoint rereads credentials in a running process.

First project and CI uploads

Forward the service and use the upstream wizard to create a project. The wizard returns a build token for uploads and an admin token for administration; store these outside the chart rather than creating projects on each Helm install.

kubectl port-forward svc/lhci 9001:9001
# In another terminal, using your installed LHCI CLI:
lhci wizard

Configure your pipeline's LHCI client with the server URL and build token, plus basic-auth credentials if enabled:

ci:
  upload:
    target: lhci
    serverBaseUrl: https://lhci.example.com

Pass LHCI_TOKEN, LHCI_BASIC_AUTH__USERNAME and LHCI_BASIC_AUTH__PASSWORD as CI secrets. These client upload settings are separate from this chart's server settings. The image provides lhctl health for local diagnostics; lhctl env displays resolved configuration and may expose credentials, so do not copy its output into public logs.

Parameters

Image parameters

NameDescriptionValue
image.registryContainer image registryghcr.io
image.repositoryLHCI image repositoryadnoctem/lhci
image.tagImage tag; empty uses Chart.appVersion""
image.digestImage digest override""
image.pullPolicyKubernetes image pull policyIfNotPresent
image.pullSecretsExisting image pull secret names[]

Name and workload overrides

NameDescriptionValue
nameOverridePartially override lhci.fullname""
fullnameOverrideFully override lhci.fullname""
kindWorkload kind; Deployment or StatefulSetDeployment

Lighthouse

Deploy lhci with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has lhci on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartlhci is pinned at v0.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply