Skip to main content

Install on Kubernetes

The chart in deploy/helm/vulnerability-operator installs the server and the web frontend. Redis, S3 and the database are external: the chart does not bundle them, so you provide them and point the chart at them. The Kubernetes agents are installed separately, see Kubernetes agents.

Install​

The chart is published to the project's OCI registry by every pipeline on the default branch and by every tag:

helm install vop oci://jonasled.dev/jonasled/vulnerability-operator/charts/vulnerability-operator \
--version 0.1.7 \
--set secrets.inline.s3AccessKey=... --set secrets.inline.s3SecretKey=... \
--set config.s3.endpoint=s3.example.internal:9000 \
--set config.redis.addr=redis.example.internal:6379 \
--set ingress.enabled=true --set 'ingress.hosts={vop.example.com}'

Replace the registry path with the one of your project, and the version with a chart version from its registry. The chart's values.yaml documents every value.

Secrets​

Use an existing secret in production instead of the inline values:

kubectl create secret generic vop-secrets \
--from-literal=s3AccessKey=... \
--from-literal=s3SecretKey=... \
--from-literal=dbPassword=... \
--from-literal=redisPassword=... \
--from-literal=adminPassword=...
helm install vop ... --set secrets.existingSecret=vop-secrets

The secret has the keys s3AccessKey, s3SecretKey, dbPassword, redisPassword and adminPassword.

Ingress​

With ingress.enabled=true, the paths /api, /swagger and /mcp go straight to the backend service, and the other paths are served by the frontend. The annotations in values.yaml suit ingress-nginx. The agent releases are about 110 MB, so the body size limit must be larger than the default, and MCP responses must not be buffered. Replace the annotations if you use another controller. Terminate TLS at the ingress, and set publicURL to the https:// address.

Database​

SQLite is the default and suits one replica. For more replicas, or for production use, configure PostgreSQL, MySQL or MSSQL:

helm install vop ... --set config.database.driver=postgres \
--set config.database.host=postgres.example.internal \
--set config.database.port=5432 \
--set config.database.user=vop \
--set secrets.inline.dbPassword=...

The chart checks at render time that these drivers come with a host and a password.

With PostgreSQL, MySQL or MSSQL a job runs vop-server migrate before the server pods start, so the pods never migrate themselves. The job is a pre-install and pre-upgrade hook, so helm install --wait works. Set migrations.hook=post to run it after the install instead, which needs no --wait. SQLite migrates when the server starts, because its file cannot be shared with a job before the first install.

Worker​

The optional worker deployment runs the scans, the scheduled tasks and the report renders, so the backend serves only the API and can be scaled freely:

helm install vop ... --set worker.enabled=true --set config.database.driver=postgres \
--set config.database.host=postgres.example.internal --set secrets.inline.dbPassword=...

With worker.enabled the backend runs with VOP_ROLE=api and needs no volume. The worker holds the Grype vulnerability database in its own volume, worker.persistence. The worker has no HTTP port and no probes, so a stuck worker shows in the Running now panel and in the job log, not as a restart. The worker needs a shared database, so it does not work with SQLite.

Replicas​

  • The SQLite driver supports one backend replica.
  • More replicas need PostgreSQL, MySQL or MSSQL, and a ReadWriteMany storage class, because every replica mounts /data for the Grype database. With the worker enabled the backend needs no volume.

Check the installation​

kubectl get pods -l app.kubernetes.io/instance=vop
helm test vop

Then open the ingress address and sign in. If you did not set adminPassword, the generated password is in the server log from its first start.