stackradar
by LockDep
StackRadar Community Edition: what is running in your Kubernetes cluster, which of it is vulnerable, and what to move to. Installs the server, the UI, a bundled Postgres and the scanner, already scanning the cluster it lands in.
About this chart
stackradar
StackRadar Community Edition: what is running in your Kubernetes cluster, which of it is vulnerable, and what to move to. Installs the server, the UI, a bundled Postgres and the scanner, already scanning the cluster it lands in.
Homepage: https://stackradar.io
Maintainers
| Name | Url | |
|---|---|---|
| StackRadar | [email protected] | https://stackradar.io |
Source Code
- https://github.com/lockdep/helm-charts/tree/main/charts/stackradar
- https://github.com/lockdep/stackradar
Requirements
Kubernetes: >=1.25.0-0
| Repository | Name | Version |
|---|---|---|
| oci://ghcr.io/lockdep/charts | scanner(stackradar-scanner) | 0.7.1 |
[!IMPORTANT] Read the upgrade notes before you upgrade
appVersion. StackRadar releases can carry schema migrations and breaking changes that the chart does not shield you from.
- The self-hosting guide covers the procedure.
- The release notes of every version you skip past, not just the target one.
- UPGRADING.md covers the chart-level changes.
Quickstart
One command on any Kubernetes 1.25+ cluster. No values file, no Postgres to bring, no second command for the scanner:
helm install stackradar oci://ghcr.io/lockdep/helm-charts/stackradar \
--namespace stackradar --create-namespace
kubectl -n stackradar port-forward svc/stackradar-client 3000:3000
Open http://localhost:3000 and log in as [email protected] /
admin. You will be asked to change the password; do it before exposing
the install beyond localhost. The scanner installed alongside is already
sweeping the cluster; its images appear with findings once the OSV mirror
has bootstrapped (minutes, depending on your connection — the UI says so
until then).
On a laptop cluster (kind, minikube, Docker Desktop) add the trimmed sizing and the two-minute Alpine-only mirror:
helm install stackradar oci://ghcr.io/lockdep/helm-charts/stackradar \
--namespace stackradar --create-namespace \
-f https://raw.githubusercontent.com/lockdep/helm-charts/main/charts/stackradar/values-quickstart.yaml
[!WARNING] Every secret the bare install uses is a public fixture — the database password, the service key, the encryption key, the session secret and the scanner's bootstrap key are the same on every install that leaves them at their defaults, and
helm installprints a WARNING naming each one still in effect. With the fixture scanner key, any pod in the cluster that can reach the server Service can upload SBOMs as the local cluster. Before relying on the install, set your own values or reference existing Secrets (see Secrets). The chart never generates a secret for you: a generated value would change on every GitOps render and rotate the scanner key each sync.
What gets installed
| Component | Default | Notes |
|---|---|---|
server Deployment | 1 replica, monolith topology | The API, the job worker and the OSV / EPSS / KEV sync schedule in one process. |
client Deployment | 1 replica | The web UI (Next.js), which also keeps its Auth.js tables in the auth schema of the same database. |
postgresql StatefulSet | bundled, 10Gi retained volume | See Bundled Postgres. |
stackradar-scanner | subchart, on | Scans the cluster it lands in and reports to the server Service in-cluster. |
worker Deployment, sync CronJobs | only with topology: split | The cloud's shape, for installs that scale the pieces separately. |
| Ingress or HTTPRoute, NetworkPolicies, ServiceMonitor, PrometheusRule, PDBs, HPAs | off | Enable per block. |
Names are <release>-<component>: stackradar-server, stackradar-client,
stackradar-postgresql, and the scanner's stackradar-scanner-watcher for
helm install stackradar.
Secrets
Three application secrets, the database password and the scanner's bootstrap credential. Each follows the same rule:
- Inline value (
secrets.internalServiceKey,postgresql.auth.password,scanner.stackradar.apiKey, …) ⇒ the chart renders the Secret. The defaults are public fixtures; replace them withopenssl rand -hex 32(uuidgen | tr A-Z a-zfor the cluster id). existingSecret(secrets.existingSecret.name,postgresql.auth.existingSecret.name,database.existingSecret.name,scanner.stackradar.existingSecret,auth.<provider>.existingSecret.name) ⇒ the chart renders nothing and reads yours; the inline values must be left at their defaults, or the render fails rather than guess which is in effect. Compatible with external-secrets, sealed-secrets and SOPS.- Neither (an inline value blanked) ⇒ the render fails with the command that generates one.
A production install provisions four Secrets beforehand and references them:
secrets:
existingSecret:
name: stackradar-secrets # internal-service-key, api-key-encryption-key, auth-secret, admin-password
postgresql:
enabled: false
database:
existingSecret:
name: stackradar-db # url: postgresql://…?sslmode=require
scanner:
stackradar:
existingSecret: stackradar-bootstrap # cluster-id, api-key
auth:
oidc:
issuer: https://idp.example.com/realms/stackradar
existingSecret:
name: stackradar-oidc # client-id, client-secret
The scanner's bootstrap credential is read by both sides: the scanner
authenticates with it and the server creates the cluster local and that
key at start-up from the same Secret. That is what makes the install one
command. The proper fix — the scanner authenticating with a projected
ServiceAccount token and no shared secret at all — is the first
post-launch item.
Bundled Postgres
postgresql.enabled: true (the default) renders a single-replica
StatefulSet on postgres:18-alpine, pinned by digest, with a retained data
volume and a NetworkPolicy that admits only this release's pods — rendered
whatever networkPolicy.enabled says, because a database whose password
may still be the public fixture must not be reachable from every pod in the
cluster. helm uninstall never deletes the volume.
What it is not: highly available, backed up, or upgraded across Postgres majors for you. There is no backup CronJob in this chart version; back it up yourself:
kubectl -n stackradar exec stackradar-postgresql-0 -- \
pg_dump -U stackradar -Fc stackradar > stackradar.dump
Moving to your own Postgres
- Scale the apps down so nothing writes:
kubectl -n stackradar scale deploy stackradar-server stackradar-client --replicas=0. - Dump the bundle (above) and restore it into the new database:
pg_restore -d "postgresql://…/stackradar?sslmode=require" --no-owner stackradar.dump. The restore needs theauthanddrizzleschemas and both apps' migration journals, which-Fccarries. - Put the new connection string in a Secret (
urlkey) and flip the values:postgresql.enabled: false,database.existingSecret.name: <secret>. helm upgrade. The pods come up against the new database; the chain is already applied, so the start-up migration is a no-op.- Once satisfied, delete the retained claim
data-stackradar-postgresql-0.
Topology
topology: monolith (default) is server + client + the scanner. The
server process runs the job worker and an in-process cron for the
vulnerability feeds on the same schedules as the cloud's CronJobs, in UTC
(sync.*.schedule). Replicas are safe: the queue claims with
SKIP LOCKED and every sync takes a Postgres advisory lock.
topology: split renders the worker Deployment and one CronJob per feed
(osv-sync, osv-bootstrap, epss-sync, kev-sync, and
artifacthub-sync when vulnerabilityData.artifactHubSync.enabled), and
the server is HTTP-only. Setting worker.* knobs under monolith fails
the render rather than being ignored.
Vulnerability data
The server mirrors OSV, EPSS and KEV itself; nothing phones home.
vulnerabilityData.osvEcosystems scopes the mirror: empty is the community
default list (the base images and package managers a cluster is made of),
Alpine is a 40 MB two-minute mirror for a first look, * is the whole
corpus (~2.5 GB of downloads, ~12 GB on disk). Widening the list rebuilds
the mirror at the next bootstrap check. The server's memory default
(server.resources) is sized for the import.
Migrations and the initializer
By default every server and client pod applies its own migration chain at start-up, serialised across replicas by a Postgres advisory lock: one migrates, the rest wait and find nothing to do. This works for Helm, Flux and Argo CD with no extra configuration.
initializer.enabled: true moves that to two pre-install/pre-upgrade
hook Jobs (the server image with MIGRATE_EXIT_AFTER=true, then the
client's), and the app pods skip it. Do note:
- Everything the Jobs read must exist before the release does. A Helm
hook runs before the chart's own Secrets and before the bundled
StatefulSet, so the initializer requires an external database
(
postgresql.enabled: false,database.existingSecret.name) and the application secrets fromsecrets.existingSecret.name. The render fails otherwise. - The Jobs run on every sync. Argo CD runs
pre-installhooks as aPreSyncstep and re-runs them each sync, which is safe because the chain no-ops when the database is current. If your team disables Helm hooks in Argo CD, leave the initializer off.
Sign-in
Local username/password is on by default (auth.local.*); the first admin
is created at start-up and must change the password on first login. Add
auth.oidc.* for any OpenID Connect provider (callback
<externalUrl>/api/auth/callback/oidc), or auth.github.* /
auth.google.*. auth.local.enabled: false hides the form once your
identity provider works; the render refuses a configuration with no
sign-in method at all. Locked out:
kubectl -n stackradar exec deploy/stackradar-client -- node scripts/admin-reset-password.mjs [email protected]
The local sign-in's per-address rate limit is in-process; with more than
one client replica, rate-limit POST /api/auth/local at the ingress.
Reaching it
Port-forward (the default; NOTES prints the commands), ingress.* or
httpRoute.* — never both. Both route / to the client; exposeApi: true
adds /v1 to the server for uploading SBOMs from outside the cluster (the
bundled scanner needs no route). externalUrl pins the browser-facing URL
when it cannot be derived from the hostname.
OpenShift compatibility
The chart targets parity with OpenShift's restricted-v2 SCC and the Pod
Security Admission restricted profile. Every pod ships with
allowPrivilegeEscalation: false, capabilities.drop: [ALL],
runAsNonRoot: true, seccompProfile.type: RuntimeDefault,
readOnlyRootFilesystem: true, no host namespaces, no ports below 1024 and
no NodePort default. OpenShift assigns UIDs per namespace, so null the
pod-level contexts and let the SCC pick them:
server:
podSecurityContext: ~
client:
podSecurityContext: ~
postgresql:
podSecurityContext: ~
Upgrading
helm upgrade stackradar oci://ghcr.io/lockdep/helm-charts/stackradar \
--namespace stackradar --version <version> -f my-values.yaml
A helm upgrade with no value changes changes nothing: no Secret is
rewritten, no key rotates, and the start-up migration finds nothing to do.
Image tags default to the chart's appVersion; a tag from another major is
refused by the render.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| auth.github.clientId | string | "" | |
| auth.github.clientSecret | string | "" | |
| auth.github.existingSecret.clientIdKey | string | "client-id" | |
| auth.github.existingSecret.clientSecretKey | string | "client-secret" | |
| auth.github.existingSecret.name | string | "" | |
| auth.google.clientId | string | "" | |
| auth.google.clientSecret | string | "" | |
| auth.google.existingSecret.clientIdKey | string | "client-id" | |
| auth.google.existingSecret.clientSecretKey | string | "client-secret" | |
| auth.google.existingSecret.name | string | "" | |
| auth.local.adminEmail | string | "[email protected]" | |
| auth.local.adminPassword | string | "admin" | Used exactly once: the first login forces a change. Read from secrets.existingSecret (adminPasswordKey) when that is set. |
| auth.local.enabled | bool | true | Local username/password sign-in. The first admin is created at start-up with the email and password below and must change the password on first login. false hides the form once an identity provider below works. |
| auth.oidc.adminGroup | string | "" | Members of this group (in groupsClaim) are platform admins, re-evaluated on every sign-in. Empty: admins are managed in StackRadar only. |
| auth.oidc.clientId | string | "" | |
| auth.oidc.clientSecret | string | "" | |
| auth.oidc.existingSecret.clientIdKey | string | "client-id" | |
| auth.oidc.existingSecret.clientSecretKey | string | "client-secret" | |
| auth.oidc.existingSecret.name | string | "" | Name of an existing Secret holding the client id and secret. |
| auth.oidc.groupsClaim | string | "" | The claim that carries groups. Empty: groups. |
| auth.oidc.issuer | string | "" |
|
Deploy stackradar with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has stackradar 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartstackradar is pinned at v0.4.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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