Dragonfly Configuration

Dragonfly Operator uses a dedicated Dragonfly CRD to create and manage Dragonfly resources. The CRD allows various configurations to define the behaviour of dragonfly controller and the dragonfly pods. Below is the table of Dragonfly CRD fields.

fields type Description
affinity Affinity Dragonfly pod affinity (Optional) 1. spec: affinity: nodeaffinity: … You can learn more about affinity here.
replicas int The total number of Dragonfly instances including the master.
image string The dragonfly image to use. Default is docker.dragonflydb.io/dragonflydb/dragonfly:v1.12.0
args []string (Optional) Dragonfly container args to pass to the container. Refer to the Dragonfly documentation for the list of supported args. Example - 1. spec: args: - “—cluster_mode=emulated”
annotations object (Optional) Annotations to add to the Dragonfly pods. See Annotations to know more about annotations.
env array Environmental Variables to add to Dragonfly pods. Example - 1. spec: env: - name: DEBUG value: true
resources ResourceRequirements (Optional) Dragonfly container resource limits. Any container limit can be specified.
tolerations []Toleration (Optional) Dragonfly pod tolerations. See k8s doc to know more about tolerations
serviceAccountName string (Optional) Dragonfly pod service account name
serviceSpec.type string (Optional) Dragonfly Service type
serviceSpec.annotations object (Optional) Dragonfly Service Annotations
authentication.passwordFromSecret SecretKeySelector (Optional) Dragonfly Password from Secret as a reference to a specific key. Example - 1. spec: authentication: passwordFromSecret: name: dragonfly-auth-secret key: password
authentication.clientCaCertSecret SecretReference (Optional) If specified, the Dragonfly instance will check if the client certificate is signed by one of this CA. Server TLS must be enabled for this. Multiple CAs can be specified with various key names. Example - 1. spec: authentication: clientCaCertSecret: name: dragonfly-client-ca
tlsSecretRef SecretReference (Optional) Dragonfly TLS secret to used for TLS Connections to Dragonfly. Dragonfly instance must have access to this secret and be in the same namespace. Example - 1. spec: tlsSecretRef: name: dragonfly-secret
snapshot.cron string (Optional) Dragonfly snapshot schedule
snapshot.persistentVolumeClaimSpec PersistentVolumeClaimSpec (Optional) Dragonfly PVC spec