Deploying on Kubernetes with Helm
The chart deploys TimescaleDB, the backend API, Grafana, and a migration Job. A Kubernetes cluster, Helm 3, and access to GHCR images are required.
Install
Copy helm/values.yaml into a private values file and configure database credentials, Grafana credentials, storage class, and ingress. The defaults are intended for local evaluation. For a cluster example, see helm/values-cluster-overrides.yaml in the repository.
helm lint ./helm -f my-values.yaml
helm template opensampl ./helm -f my-values.yaml
helm install opensampl ./helm --namespace opensampl --create-namespace \
-f my-values.yaml --wait --wait-for-jobs --timeout 15m
For published charts, replace ./helm with oci://ghcr.io/ornl/charts/opensampl and pass --version <chart-version>. Read the version from helm/Chart.yaml for the release being installed.
Migrations run as post-install and post-upgrade hooks. The backend waits for the database port, but callers should wait for the migration hook to finish before loading data. A failed Job is retained for inspection with kubectl logs job/<release-fullname>-migrations.
Configuration
db.persistence.enableddefaults to true. Claim templates usedb.persistence.sizeanddb.persistence.storageClass; false uses ephemeralemptyDirstorage.backend.useApiKeyenables authentication. SetAPI_KEYSthroughbackend.env, preferably using a Kubernetes Secret reference. Clients send one key through theaccess-keyheader.db.grafanaPasswordis the read-only datasource role password.grafana.adminPasswordcontrols the Grafana administrator separately.grafana.rootUrloptionally sets the external Grafana URL. For/grafanaingress paths, also setgrafana.serveFromSubPath: true.- Configure ingress through
ingress.enabled,ingress.className,ingress.hosts, and optionalingress.tls, as demonstrated in the cluster example.
The datasource receives the release-specific database service address automatically.
Upgrade and storage
Back up PostgreSQL before upgrading. Use helm upgrade with the same release name, namespace, and values; migrations rerun on upgrade. Existing StatefulSet and database claim names are preserved.
Changing persistence mode, claim size, or storage class may require a controlled StatefulSet recreation or storage-provider procedure. Do not delete existing claims: stop writers, back up and verify the database, follow your storage provider's migration procedure, then restore and verify data before resuming writers.
Chart 0.2.4 removes an unused standalone PVC; database data remains in StatefulSet-managed claims. Confirm claim usage before upgrading customized installations. Grafana's internal database is PostgreSQL; imported dashboards and datasource configuration should be verified after deployment.