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.

fieldstypeDescription
affinityAffinityDragonfly pod affinity (Optional)
  1. spec:
    affinity:
    nodeaffinity:
You can learn more about affinity here.
replicasintThe total number of Dragonfly instances including the master.
imagestringThe 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
annotationsobject(Optional) Annotations to add to the Dragonfly pods. See Annotations to know more about annotations.
envarrayEnvironmental Variables to add to Dragonfly pods. Example -
  1. spec:
    env:
    - name: DEBUG
    value: true
resourcesResourceRequirements(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
serviceAccountNamestring(Optional) Dragonfly pod service account name
serviceSpec.typestring(Optional) Dragonfly Service type
serviceSpec.annotationsobject(Optional) Dragonfly Service Annotations
authentication.passwordFromSecretSecretKeySelector(Optional) Dragonfly Password from Secret as a reference to a specific key. Example -
  1. spec:
    authentication:
    passwordFromSecret:
    name: dragonfly-auth-secret
    key: password
authentication.clientCaCertSecretSecretReference(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
tlsSecretRefSecretReference(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.cronstring(Optional) Dragonfly snapshot schedule
snapshot.persistentVolumeClaimSpecPersistentVolumeClaimSpec(Optional) Dragonfly PVC spec