Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ backend synapse-{{ $workerType }}
timeout queue 5s

{{- end }}
{{- $maxInstances := ternary 1 20 (not (empty (include "element-io.synapse.process.isSingle" (dict "root" $root "context" $workerType)))) }}
{{- $maxInstances := ternary 20 1 (hasKey $workerDetails "replicas") }}
{{- $workerTypeName := include "element-io.synapse.process.workerTypeName" (dict "root" $root "context" $workerType) }}
# Use DNS SRV service discovery on the headless service
server-template {{ $workerTypeName }} {{ $maxInstances }} _synapse-http._tcp.{{ $root.Release.Name }}-synapse-{{ $workerTypeName }}.{{ $root.Release.Namespace }}.svc.cluster.local resolvers kubedns init-addr none check
Expand Down
21 changes: 0 additions & 21 deletions charts/matrix-stack/templates/synapse/_synapse_details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,6 @@ hasReplication
{{- end -}}
{{- end }}

{{- define "element-io.synapse.process.isSingle" -}}
{{- $root := .root -}}
{{- with required "element-io.synapse.process.isSingle missing context" .context -}}
{{ $isSingle := (list "main"
"account-data"
"appservice"
"background"
"encryption"
"media-repository"
"presence-writer"
"push-rules"
"receipts"
"sso-login"
"typing-persister"
"user-dir") }}
{{- if has . $isSingle -}}
isSingle
{{- end -}}
{{- end -}}
{{- end }}

{{- define "element-io.synapse.process.canFallbackToMain" -}}
{{- $root := .root -}}
{{- with required "element-io.synapse.process.canFallbackToMain missing context" .context -}}
Expand Down
1 change: 1 addition & 0 deletions newsfragments/644.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Source whether Synapse workers are single or scalable from the values rather than maintaining a list of single vs scalable workers.
Loading