Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions contrib/charts/dragonfly/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,21 @@ containers:
{{- with .Values.extraArgs }}
{{- toYaml . | trim | nindent 6 }}
{{- end }}
{{- with .Values.cluster }}
{{- $modeRaw := .mode | default "" }}
{{- $clusterMode := "" }}
{{- if kindIs "bool" $modeRaw }}
{{- if $modeRaw }}{{- $clusterMode = "yes" }}{{- end }}
{{- else }}
{{- $clusterMode = $modeRaw | toString }}
{{- end }}
{{- if ne $clusterMode "" }}
- "--cluster_mode={{ $clusterMode }}"
{{- end }}
{{- if and (ne $clusterMode "") .experimentalShardBySlot }}
- "--experimental_cluster_shard_by_slot=true"
{{- end }}
{{- end }}
{{- if .Values.tls.enabled }}
- "--tls"
- "--tls_cert_file=/etc/dragonfly/tls/tls.crt"
Expand Down
10 changes: 10 additions & 0 deletions contrib/charts/dragonfly/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,16 @@ command: []
# -- Extra arguments to pass to the dragonfly binary
extraArgs: []

cluster:
# -- Redis cluster protocol mode passed to Dragonfly as --cluster_mode.
# -- Accepts "emulated" or "yes". Unquoted `yes` (parsed as boolean by YAML)
# -- is also supported and treated as the string "yes".
# -- Leave empty to disable cluster mode.
mode: ""
# -- When cluster mode is enabled, pass --experimental_cluster_shard_by_slot=true
# -- so sharding follows slots instead of hash tags.
experimentalShardBySlot: false

# -- Extra volumes to mount into the pods
extraVolumes: []

Expand Down