From c13ac3d9a4dd3503838b7638fda6e66e2d7f2842 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Sat, 20 Mar 2021 20:44:38 +0100 Subject: [PATCH] matrix-synapse: Fix ternary with --set --- charts/matrix-synapse/templates/worker-configuration.yaml | 2 +- charts/matrix-synapse/templates/worker-deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/matrix-synapse/templates/worker-configuration.yaml b/charts/matrix-synapse/templates/worker-configuration.yaml index 6c37b4b..7e6d5a4 100644 --- a/charts/matrix-synapse/templates/worker-configuration.yaml +++ b/charts/matrix-synapse/templates/worker-configuration.yaml @@ -21,7 +21,7 @@ data: {{- $name := $worker | replace "_" "-" }} {{ $name }}.worker: | - worker_app: "synapse.app.{{ $config.generic | ternary "generic_worker" $worker }}" + worker_app: "synapse.app.{{ (not (not $config.generic)) | ternary "generic_worker" $worker }}" {{- if $config.name -}} {{- if (ne $config.replicaCount 1) -}} {{- fail "Replica count must be 1 if a worker has a unique name." -}} diff --git a/charts/matrix-synapse/templates/worker-deployment.yaml b/charts/matrix-synapse/templates/worker-deployment.yaml index 74cdd37..3ab6385 100644 --- a/charts/matrix-synapse/templates/worker-deployment.yaml +++ b/charts/matrix-synapse/templates/worker-deployment.yaml @@ -63,7 +63,7 @@ spec: -e "s/@@REDIS_PASSWORD@@/${REDIS_PASSWORD:-}/" \ > /synapse/config/conf.d/secrets.yaml - exec python -B -m synapse.app.{{ $config.generic | ternary "generic_worker" $worker }} \ + exec python -B -m synapse.app.{{ (not (not $config.generic)) | ternary "generic_worker" $worker }} \ -c /synapse/config/homeserver.yaml \ -c /synapse/config/conf.d/ \ -c /synapse/config/{{ $name }}.worker