dragonfly

by QuenchWorks

Helm chartv0.0.32App 1.40.2BUSL-1.1Verified publisher

Multi-threaded, Redis- and Memcached-compatible in-memory datastore built to scale vertically on one node. Hardened by QuenchWorks as a minimal, nonroot, CVE-gated image, cosign-signed and pinned by digest.

About this chart

Quenchworks Dragonfly

LICENSE WARNING, Dragonfly is BSL-1.1 (Business Source License), NOT OSI-approved open source. Each release converts to Apache-2.0 only years after publication. Do not represent Dragonfly as open source.

Clean alternative: Valkey (BSD-3-Clause, already shipped) covers the same Redis-compatible cache slot with a true open-source license, prefer it.

Hardened Dragonfly (a Redis/Memcached-compatible in-memory datastore) on a minimal, nonroot, CVE-gated image pinned by digest. Caution tier.

Install

helm install my-dragonfly oci://ghcr.io/quenchworks/charts/dragonfly

Prefer the open-source option instead:

helm install my-valkey oci://ghcr.io/quenchworks/charts/valkey

Auth is off by default (matching the image; Dragonfly is open on the wire, so the NetworkPolicy is the security boundary). To require a password:

helm install my-dragonfly oci://ghcr.io/quenchworks/charts/dragonfly \
  --set auth.enabled=true --set auth.password='change-me'

Connect

Dragonfly speaks the Redis RESP protocol, so any redis-cli works against port 6379:

kubectl run rediscli --rm -i --restart=Never --image=redis:7-alpine -- \
  redis-cli -h my-dragonfly -p 6379 SET hello quench
kubectl run rediscli --rm -i --restart=Never --image=redis:7-alpine -- \
  redis-cli -h my-dragonfly -p 6379 GET hello

Standalone vs HA

The chart runs in three modes.

Modearchitecture / sentinel.enabledTopologyFailover
Standalone (default)standalone1 nodenone (single node)
Replicationreplication / false1 primary + N read replicasmanual / operator-driven
HAreplication / true1 primary + 2 replicas + 3 Sentinelsautomatic

HA, automatic failover (validated on kind)

helm install my-dragonfly oci://ghcr.io/quenchworks/charts/dragonfly \
  --set architecture=replication --set sentinel.enabled=true --set auth.enabled=true

Dragonfly speaks the Redis replication protocol (REPLICAOF / INFO replication) and, crucially, reports a Sentinel-compatible INFO replication (role, connected_slaves, slave0:…state=online, master_link_status). Dragonfly ships no sentinel binary of its own, so the Sentinels run valkey-sentinel from the QuenchWorks Valkey image, same RESP

  • Sentinel API. Three Sentinels monitor the Dragonfly primary; on primary loss they reach quorum and promote a replica (SLAVEOF NO ONE), reconfiguring the survivors to follow it. This was verified on kind: killing the primary promoted a replica in a few seconds, writes landed on the new master, and the restarted old primary rejoined as a replica with its data intact.

Config seeding and boot-time master discovery run in a hardened busybox init container that writes a Dragonfly flagfile into an emptyDir, so a promoted replica keeps its role and a restarted node always rejoins whichever node Sentinel currently reports as master (never the dead pre-failover one). The Dragonfly image itself is unchanged.

Sentinel-aware clients should discover the current master rather than hard-code a host:

# against the sentinel Service on :26379
redis-cli -h my-dragonfly-sentinel -p 26379 SENTINEL get-master-addr-by-name mymaster

The primary Service (my-dragonfly) always selects the node currently labelled primary, so plain clients can still write to it.

Sentinel's instance-tracking relies on run_id, which Dragonfly's INFO server does not expose. Failover was nonetheless reliable in testing; this is why the Sentinel binary comes from the Valkey image rather than an unverified path. If you need a fully open-source Sentinel-HA cache, Valkey is the clean-licensed alternative.

Replication without Sentinel, manual failover

helm install my-dragonfly oci://ghcr.io/quenchworks/charts/dragonfly \
  --set architecture=replication --set sentinel.enabled=false

Replicas statically REPLICAOF the bootstrap primary (…-primary-0). There is no automatic promotion: to fail over, an operator issues REPLICAOF NO ONE against the chosen replica and repoints the others.

Verify the image

cosign verify ghcr.io/quenchworks/images/dragonfly \
  --certificate-identity-regexp 'https://github.com/quenchworks/.+' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Each build also ships an SPDX SBOM and SLSA provenance attestation. Verify them with gh attestation verify oci://ghcr.io/quenchworks/images/dragonfly --owner quenchworks.

Memory contract (important)

Dragonfly refuses to start unless maxmemory >= threads * 256MiB. The defaults (config.threads: 2, config.maxmemory: 512mb) are self-consistent under a ~1Gi limit. If you raise config.threads, raise config.maxmemory (>= threads*256MiB) and the pod memory limit together. config.forceEpoll stays true because io_uring is restricted under nonroot/kind/seccomp.

Values

KeyDefaultNotes
image.repositoryghcr.io/quenchworks/images/dragonfly
image.digest(CI-written)Required. Charts pin by digest, never a tag.
auth.enabledfalseSets --requirepass via a Secret.
auth.password""Generated into a Secret if empty and auth on.
auth.existingSecret""Use an existing Secret instead.
config.threads2--proactor_threads.
config.maxmemory512mb--maxmemory. MUST be >= threads*256MiB.
config.forceEpolltrueKeep epoll on (io_uring restricted under nonroot/kind).
extraFlags[]Extra dragonfly server flags (applied in replication mode; see note).
tls.enabledfalseNative TLS on 6379 (cert at /tls); replicas sync over it. Not with sentinel.enabled yet: its master discovery is plaintext.
tls.existingSecret""Use this kubernetes.io/tls Secret (1st choice).
tls.certManager.enabledfalseRequest a cert-manager Certificate from tls.certManager.issuerRef (2nd choice).
tls.selfSigned.validityDays365Otherwise Helm generates a CA + certificate, kept across upgrades.
architecturestandalonestandalone or replication.
sentinel.enabledfalseWith replication, adds a Sentinel quorum for automatic failover.
sentinel.replicaCount3Sentinel count.
sentinel.quorum2Sentinels that must agree the primary is down.
sentinel.port26379Sentinel port.
sentinel.image.*valkey imageSentinel binary source (valkey-sentinel), pinned by digest.
busybox.*busybox imageInit-container helper (HA config seeding), pinned by digest.
primary.replicaCount1Primary count (keep at 1).
primary.persistence.enabledtrue8Gi PVC at /data on the primary.
replica.replicaCount2Read replicas (replication mode).
replica.persistence.enabledtrue8Gi PVC at /data per replica.
service.port6379RESP / Redis protocol.
serviceAccount.createtrueToken automount is off.
rbac.createfalseMinimal Role/RoleBinding.
networkPolicy.enabledtrueRestricts ingress to the release namespace.
podDisruptionBudget.enabledtrueminAvailable: 1.

Notes

The chart depends on the quench-common library chart, pulled from oci://ghcr.io/quenchworks/charts/quench-common. Every container runs as nonroot on a read-only root filesystem with all capabilities dropped, and the image is pinned by digest.

extraFlags take effect only in replication mode: there the chart runs the dragonfly binary directly, whereas standalone uses the image's env-based entrypoint, which rebuilds its own argument list and does not forward extra container args.

Deploy dragonfly with OpenTenant

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