cache-stack

by QuenchWorks

Helm chartv0.0.36App 1.0.0Apache-2.0Verified publisher

Hardened cache stack with metrics: Valkey (Redis-compatible) with a redis_exporter sidecar, Prometheus discovering it in the release namespace, and Grafana with the Prometheus datasource and the redis_exporter dashboard provisioned. All component images are QuenchWorks-hardened, nonroot, CVE-gated, pinned by digest and cosign-signed.

About this chart

cache-stack

A cache with metrics in one install:

  • Valkey, the Redis-compatible cache, with a redis_exporter sidecar
  • Prometheus, which discovers the exporter in the release namespace
  • Grafana, with the Prometheus datasource and the redis_exporter dashboard provisioned

Every component is a QuenchWorks chart on a hardened, nonroot, CVE-gated image, pinned by digest and cosign-signed.

Install

helm install cache oci://ghcr.io/quenchworks/charts/cache-stack
kubectl get secret cache-valkey -o jsonpath='{.data.valkey-password}' | base64 -d

Point Redis clients at cache-valkey:6379 with that password. For Grafana:

kubectl port-forward svc/cache-grafana 3000:3000
kubectl get secret cache-grafana -o jsonpath='{.data.admin-password}' | base64 -d

The dashboard is "Redis Dashboard for Prometheus Redis Exporter 1.x".

How the pieces connect

  • The valkey subchart runs redis_exporter beside Valkey, behind the <release>-valkey-metrics Service on port metrics (9121).
  • Prometheus finds it with kubernetes_sd_configs (role endpoints, own_namespace: true). It keeps Services labelled app.kubernetes.io/name=valkey that have a port named metrics, and labels each series with its namespace, which the dashboard filters on.
  • The stack grants Prometheus's ServiceAccount a namespaced Role (read services, endpoints, endpointslices and pods) and projects its token, which the prometheus chart does not mount by default.
  • Grafana's datasource (uid prometheus) and dashboard come from ConfigMaps this chart owns.

Any other Valkey installed in the same namespace with the quench valkey chart and metrics.enabled=true is discovered too.

Values

Each component takes its own chart's values under its key: valkey.*, prometheus.*, grafana.*. The stack's own keys:

KeyDefaultMeaning
valkey.enabled / prometheus.enabled / grafana.enabledtrueturn a component off
valkey.metrics.enabledtruethe exporter sidecar the stack scrapes
dashboards.enabledtrueprovision the redis_exporter dashboard

One cache-stack per namespace: the Grafana provisioning ConfigMaps have fixed names.

Release gate

On kind, the gate writes keys into Valkey through its password. It then requires three things: Prometheus reports redis_up == 1 for the discovered exporter with the right namespace label, the key count reaches Prometheus, and Grafana finds the provisioned dashboard and answers a query through its Prometheus datasource.

The chart depends on the quench-common chart from oci://ghcr.io/quenchworks/charts.

Deploy cache-stack with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cache-stack 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 chartcache-stack is pinned at v0.0.36 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