From a2892dca22fc4585de11809796998340e263543d Mon Sep 17 00:00:00 2001 From: Alex Manning Date: Wed, 13 Sep 2023 21:15:01 +0100 Subject: [PATCH] Improvements for mautrix-whatsapp. --- .../mautrix-whatsapp/templates/service.yaml | 1 + .../{deployment.yaml => statefulset.yaml} | 22 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) rename charts/mautrix-whatsapp/templates/{deployment.yaml => statefulset.yaml} (76%) diff --git a/charts/mautrix-whatsapp/templates/service.yaml b/charts/mautrix-whatsapp/templates/service.yaml index 9b3ea1c..bd34c4b 100644 --- a/charts/mautrix-whatsapp/templates/service.yaml +++ b/charts/mautrix-whatsapp/templates/service.yaml @@ -5,6 +5,7 @@ metadata: labels: {{- include "mautrix-whatsapp.labels" . | nindent 4 }} spec: + publishNotReadyAddresses: true type: {{ .Values.service.type }} ports: - port: {{ .Values.service.port }} diff --git a/charts/mautrix-whatsapp/templates/deployment.yaml b/charts/mautrix-whatsapp/templates/statefulset.yaml similarity index 76% rename from charts/mautrix-whatsapp/templates/deployment.yaml rename to charts/mautrix-whatsapp/templates/statefulset.yaml index 3a4fbc0..5e45ce9 100644 --- a/charts/mautrix-whatsapp/templates/deployment.yaml +++ b/charts/mautrix-whatsapp/templates/statefulset.yaml @@ -1,10 +1,11 @@ apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: {{ include "mautrix-whatsapp.fullname" . }} labels: {{- include "mautrix-whatsapp.labels" . | nindent 4 }} spec: + serviceName: {{ include "mautrix-whatsapp.fullname" . }}-appservice-nocollide revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} replicas: 1 selector: @@ -47,6 +48,25 @@ spec: workingDir: "/data" command: - "/usr/bin/mautrix-whatsapp" + - --no-update + startupProbe: + httpGet: + port: appservice + path: "/_matrix/mau/live" + periodSeconds: 10 + failureThreshold: 60 + livenessProbe: + httpGet: + port: appservice + path: "/_matrix/mau/live" + periodSeconds: 10 + failureThreshold: 12 + readinessProbe: + httpGet: + port: appservice + path: "/_matrix/mau/ready" + periodSeconds: 10 + failureThreshold: 12 {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }}