Dragonfly Configuration

Latest release - https://github.com/dragonflydb/dragonfly-operator/releases

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 (i.e. release version) to use. Default is docker.dragonflydb.io/dragonflydb/dragonfly:v1.21.2
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.
labelsobject(Optional) Labels to add to the Dragonfly pods. See Labels to know more about labels.
aclFromSecret (since v1.1.1)SecretKeySelector(Optional) Acl file Secret to pass to the container
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.name (since 1.1.3)string(Optional) Dragonfly custom Service name
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
nodeSelector (since v1.1.1)object(Optional) Dragonfly pod node selector
topologySpreadConstraints (since v1.1.1)[]TopologySpreadConstraint(Optional) Dragonfly pod topologySpreadConstraints
priorityClassName (since v1.1.1)string(Optional) Dragonfly pod priority class name
skipFSGroup (since v1.1.2)bool(Optional) Skip Assigning FileSystem Group. Required for platforms such as Openshift that require IDs to not be set, as it injects a fixed randomized ID per namespace into all pods.
memcachedPort (since v1.1.2)int(Optional) Dragonfly memcached port. Use this instead of —memcached_port arg