dragonfly
Skill4 starsChanged 5 months agoMITView on GitHub
Use when working with DragonflyDB operator on Kubernetes — creating or troubleshooting Dragonfly resources, configuring replication, snapshots, TLS, authentication, or affinity/scheduling for Dragonfly instances.
In this repository74 other files it gives its agents.
- AGENTS.mdAGENTS.md
- atlasSkill
- cert-managerSkill
- cilium-gatewaySkill
- cilium-networkSkill
- cnpgSkill
- external-dnsSkill
- external-secretsSkill
- flaggerSkill
- fluxSkill
- gitea-apiSkill
- gitea-registrySkill
- gitea-runnerSkill
- giteaSkill
- gitea-teaSkill
- gitea-webhooksSkill
- harbor-apiSkill
- harbor-helmSkill
- harborSkill
- harbor-terraformSkill
- helm-chartSkill
- helm-opsSkill
- helmSkill
- higress-helmSkill
- higress-operatorSkill
- higressSkill
- kserve-helmSkill
- kserve-operatorSkill
- kserveSkill
- kubeflow-pipelinesSkill
- kubeflowSkill
- kubeflow-trainerSkill
- kubeflow-training-operatorSkill
- mariadb-helmSkill
- mariadb-operatorSkill
- mariadbSkill
- netbird-cliSkill
- netbird-operatorSkill
- netbird-serverSkill
- netbirdSkill
- netbird-terraformSkill
- nextcloud-apiSkill
- nextcloud-helmSkill
- nextcloudSkill
- nvidia-device-pluginSkill
- rook-ceph-operatorSkill
- rook-cephSkill
- rook-ceph-toolboxSkill
- sealed-secretsSkill
- stakater-reloaderSkill
- tailscaleSkill
- tailscale-talosSkill
- talosconfigSkill
- talosctlSkill
- talosSkill
- talos-terraformSkill
- tekton-operatorSkill
- tekton-pacSkill
- tekton-pipelinesSkill
- tektonSkill
- The first 60 shown.
The file
Files
DragonflyDB Operator
Overview
Dragonfly operator manages Dragonfly (Redis-compatible) in-memory data store instances on Kubernetes. API: dragonflydb.io/v1alpha1. Single CRD: Dragonfly (plural: dragonflies). Deployed via Helm chart oci://ghcr.io/dragonflydb/dragonfly-operator/helm/dragonfly-operator. Latest operator: v1.5.0 (Mar 2026). Deployed chart: v1.5.0.
CRD Fields
| Field | Type | Since | Description |
replicas | int | — | Total instances (1 = standalone primary, 2 = 1 primary + 1 replica) |
image | string | — | Dragonfly image (default: docker.dragonflydb.io/dragonflydb/dragonfly:v1.21.2) |
args | []string | — | Dragonfly server args (e.g. --maxmemory=2gb) |
resources | ResourceRequirements | — | Container CPU/memory |
affinity | Affinity | — | Pod affinity (nodeAffinity, podAntiAffinity, etc.) |
nodeSelector | map | v1.1.1 | Node selector for pod scheduling |
tolerations | []Toleration | — | Pod tolerations |
topologySpreadConstraints | []TopologySpreadConstraint | v1.1.1 | Spread pods across topology domains |
annotations | object | — | Annotations on Dragonfly pods |
labels | object | — | Labels on Dragonfly pods |
env | []EnvVar | — | Environment variables |
authentication.passwordFromSecret | SecretKeySelector | — | Password from Secret key |
authentication.clientCaCertSecret | SecretReference | — | Client CA certificate Secret |
tlsSecretRef | SecretReference | — | TLS cert Secret for server TLS |
snapshot.cron | string | — | Cron schedule for snapshots (e.g. "\*/5 * * * *") |
snapshot.persistentVolumeClaimSpec | PVC Spec | — | PVC for snapshot storage |
aclFromSecret | SecretKeySelector | v1.1.1 | ACL file from Secret |
serviceAccountName | string | — | Pod service account |
serviceSpec.type | string | — | Service type (ClusterIP, LoadBalancer, etc.) |
serviceSpec.name | string | v1.1.3 | Custom service name |
serviceSpec.annotations | object | — | Service annotations |
priorityClassName | string | v1.1.1 | Pod priority class |
skipFSGroup | bool | v1.1.2 | Skip FSGroup assignment (OpenShift) |
memcachedPort | int | v1.1.2 | Memcached port (alternative to --memcached_port arg) |
additionalContainers | []Container | — | Sidecar containers |
additionalVolumes | []Volume | — | Extra volumes |
Dragonfly Spec Patterns
apiVersion: dragonflydb.io/v1alpha1
kind: Dragonfly
metadata:
name: my-cache
spec:
replicas: 1 # 1 = standalone primary
args:
- --maxmemory=2gb
- --logtostderr
- --cluster_mode=emulated # Enable cluster-compatible mode
- --lock_on_hashtags # Hashtag-based locking
- --default_lua_flags=allow-undeclared-keys
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: "1"
memory: 2Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- worker-01
authentication:
passwordFromSecret:
name: dragonfly-password
key: password
snapshot:
cron: "*/5 * * * *"
persistentVolumeClaimSpec:
accessModes:
- ReadWriteOnce
storageClassName: ceph-block
resources:
requests:
storage: 2Gi
serviceSpec:
type: ClusterIP
annotations:
external-dns.alpha.kubernetes.io/hostname: dragonfly.example.comReplication Model
replicas=1— standalone primaryreplicas=2— 1 primary + 1 replicareplicas=3— 1 primary + 2 replicas- Always exactly 1 primary regardless of replica count
- Operator manages automatic failover if primary fails
- Service
<name>.<ns>.svc.cluster.localalways points to current primary
Authentication
| Method | Config | Description |
| Password | authentication.passwordFromSecret | Basic password auth (maps to --requirepass) |
| Client CA | authentication.clientCaCertSecret | TLS client cert verification |
| ACL file | aclFromSecret | ACL rules file from Secret (v1.1.1+) |
Password can also be set via args: ["--requirepass=<pw>"] or env: [{name: DFLY_requirepass, value: "<pw>"}].
TLS
spec:
tlsSecretRef:
name: dragonfly-tls # Secret must have tls.crt, tls.keySecret must exist in same namespace. Optionally combine with authentication.clientCaCertSecret for mutual TLS.
Snapshots
Snapshots store Dragonfly data to PVC for persistence across restarts:
spec:
snapshot:
cron: "*/5 * * * *"
persistentVolumeClaimSpec:
storageClassName: ceph-block
accessModes: [ReadWriteOnce]
resources:
requests:
storage: 2Gicronis optional — omit for on-demand only- Snapshots not auto-pruned — manage disk or use static
--dbfilenameto overwrite - PVC spec follows standard Kubernetes
PersistentVolumeClaimSpec
Exposing Dragonfly as Cache
Applications connect via the service at <name>.<ns>.svc.cluster.local:6379. In apps using Dragonfly as Redis-compatible cache (valkey/Redis clients):
# In the app's ConfigMap or env
REDIS_URL: redis://:${REDIS_PASSWORD}@my-cache.namespace:6379
REDIS_PASSWORD: # from Dragonfly auth secretFor cluster-mode emulated (--cluster_mode=emulated), Redis cluster clients (e.g. ioredis cluster mode) can connect as if it's a Redis Cluster — but there's only one actual Dragonfly instance behind the service.
Monitoring
Dragonfly exposes metrics on the admin port. Use a PodMonitor to scrape:
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: dragonfly-monitor
spec:
selector:
matchLabels:
app: my-cache # Must match Dragonfly resource name
podMetricsEndpoints:
- port: adminThe operator creates pods with label app: <dragonfly-name> by default.
Common Mistakes
replicasconfusion — replicas=2 means 1 primary + 1 replica, NOT 2 primaries- No snapshot cron — without
cron+ PVC, restarts lose all data; always configure for stateful use cluster_mode=emulatedwithoutlock_on_hashtags— emulated cluster needs hashtag locking for multi-key ops- Password collision — don't set password via both
authentication.passwordFromSecretAND--requirepassarg; use the CRD field - Same storageClass for all — immich with ceph-block fine; if latency-sensitive, use local SSD via
nodeSelector+ local storage - No resource limits — Dragonfly can OOM under load; always set
resources.limits.memory - Helm chart OCI URL — use
oci://ghcr.io/dragonflydb/dragonfly-operator/helm, chart namedragonfly-operator, versionv1.5.0
Version History
| Operator | Helm Chart | Date | Notes |
| v1.5.0 | v1.5.0 | Mar 2026 | Latest (deployed) |
| v1.4.0 | v1.4.0 | Jan 2026 | |
| v1.3.1 | v1.3.1 | Nov 2025 |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

