From 6016baa4f696d4397eb880ac349985cdca18df67 Mon Sep 17 00:00:00 2001 From: Alexander Olofsson Date: Mon, 28 Jun 2021 15:10:10 +0200 Subject: [PATCH] matrix-synapse: Allow probe configuration --- charts/matrix-synapse/Chart.yaml | 2 +- .../matrix-synapse/templates/deployment.yaml | 12 ++++---- .../templates/worker-deployment.yaml | 12 ++++---- charts/matrix-synapse/values.yaml | 28 +++++++++++++++++++ 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/charts/matrix-synapse/Chart.yaml b/charts/matrix-synapse/Chart.yaml index 7849903..4f81b96 100644 --- a/charts/matrix-synapse/Chart.yaml +++ b/charts/matrix-synapse/Chart.yaml @@ -6,7 +6,7 @@ icon: https://matrix.org/images/matrix-logo.svg appVersion: 1.36.0 type: application -version: 2.0.13 +version: 2.1.0 maintainers: - name: Alexander Olofsson email: ace@haxalot.com diff --git a/charts/matrix-synapse/templates/deployment.yaml b/charts/matrix-synapse/templates/deployment.yaml index 9f58bc6..61d2092 100644 --- a/charts/matrix-synapse/templates/deployment.yaml +++ b/charts/matrix-synapse/templates/deployment.yaml @@ -111,14 +111,14 @@ spec: - name: metrics containerPort: 9090 protocol: TCP + {{- with .Values.synapse.livenessProbe }} livenessProbe: - httpGet: - path: /health - port: http + {{- . | toYaml | nindent 12 }} + {{- end }} + {{- with .Values.synapse.readinessProbe }} readinessProbe: - httpGet: - path: /health - port: http + {{- . | toYaml | nindent 12 }} + {{- end }} volumeMounts: - name: config mountPath: /synapse/config diff --git a/charts/matrix-synapse/templates/worker-deployment.yaml b/charts/matrix-synapse/templates/worker-deployment.yaml index 9d62111..dfbf0b9 100644 --- a/charts/matrix-synapse/templates/worker-deployment.yaml +++ b/charts/matrix-synapse/templates/worker-deployment.yaml @@ -94,14 +94,14 @@ spec: - name: listener containerPort: 8083 protocol: TCP + {{- if (or $config.livenessProbe $default.livenessProbe) }} livenessProbe: - httpGet: - path: /health - port: listener + {{- $config.livenessProbe | default $default.livenessProbe | toYaml | nindent 12 }} + {{- end }} + {{- if (or $config.readinessProbe $default.readinessProbe) }} readinessProbe: - httpGet: - path: /health - port: listener + {{- $config.readinessProbe | default $default.readinessProbe | toYaml | nindent 12 }} + {{- end }} {{- end }} resources: {{- $config.resources | default $default.resources | toYaml | nindent 12 }} diff --git a/charts/matrix-synapse/values.yaml b/charts/matrix-synapse/values.yaml index 95da9e7..b30142b 100644 --- a/charts/matrix-synapse/values.yaml +++ b/charts/matrix-synapse/values.yaml @@ -218,6 +218,20 @@ synapse: # cpu: 1000m # memory: 2500Mi + ## Liveness probe configuration to use + ## + livenessProbe: + httpGet: + path: /health + port: http + + ## Readiness probe configuration to use + ## + readinessProbe: + httpGet: + path: /health + port: http + ## Node selectors to set for the main Synapse pod. ## nodeSelector: {} @@ -300,6 +314,20 @@ workers: # requests: # cpu: 100m # memory: 128Mi + + ## Liveness probe configuration to use + ## + livenessProbe: + httpGet: + path: /health + port: listener + + ## Readiness probe configuration to use + ## + readinessProbe: + httpGet: + path: /health + port: listener ## Node selector configuration to set on the worker. ##