From 7d805bd29b24a4d0f708479a0b33a604e867c7db Mon Sep 17 00:00:00 2001 From: alexlebens Date: Sat, 1 Jun 2024 20:04:50 -0500 Subject: [PATCH] convert to use app-template --- .../cl01tl/platform/matrix-synapse/Chart.yaml | 35 ++- .../templates/service-monitor.yaml | 23 ++ .../platform/matrix-synapse/values.yaml | 222 ++++++++++++++---- 3 files changed, 221 insertions(+), 59 deletions(-) diff --git a/clusters/cl01tl/platform/matrix-synapse/Chart.yaml b/clusters/cl01tl/platform/matrix-synapse/Chart.yaml index 9f4b12bfa..4e8b5636e 100644 --- a/clusters/cl01tl/platform/matrix-synapse/Chart.yaml +++ b/clusters/cl01tl/platform/matrix-synapse/Chart.yaml @@ -1,26 +1,41 @@ apiVersion: v2 name: matrix-synapse version: 1.0.0 +description: Matrix Synapse +keywords: + - chat + - bridge + - matrix + - matrix-hookshot + - mautrix-discord + - mautrix-whatsapp sources: - https://github.com/element-hq/synapse - https://github.com/matrix-org/matrix-hookshot - https://github.com/mautrix/discord - https://github.com/mautrix/whatsapp + - https://github.com/cloudflare/cloudflared - https://gitlab.com/ananace/charts/-/tree/master/charts/matrix-synapse - https://github.com/alexlebens/helm-charts/charts/postgres-cluster + - https://github.com/bjw-s/helm-charts/tree/main/charts/other/app-template +maintainers: + - name: alexlebens dependencies: - name: matrix-synapse version: 3.9.5 repository: https://ananace.gitlab.io/charts - - name: matrix-hookshot - version: 0.1.1 - repository: http://alexlebens.github.io/helm-charts - - name: mautrix-discord - version: 0.1.1 - repository: http://alexlebens.github.io/helm-charts - - name: mautrix-whatsapp - version: 0.1.1 - repository: http://alexlebens.github.io/helm-charts + - name: app-template + alias: matrix-hookshot + repository: https://bjw-s.github.io/helm-charts/ + version: 3.2.1 + - name: app-template + alias: mautrix-discord + repository: https://bjw-s.github.io/helm-charts/ + version: 3.2.1 + - name: app-template + alias: mautrix-whatsapp + repository: https://bjw-s.github.io/helm-charts/ + version: 3.2.1 - name: redis version: 19.5.0 repository: https://charts.bitnami.com/bitnami @@ -31,7 +46,7 @@ dependencies: - name: cloudflared alias: cloudflared-hookshot repository: http://alexlebens.github.io/helm-charts - version: 1.2.0 + version: 1.2.0 - name: postgres-cluster alias: postgres-16-cluster version: 3.1.0 diff --git a/clusters/cl01tl/platform/matrix-synapse/templates/service-monitor.yaml b/clusters/cl01tl/platform/matrix-synapse/templates/service-monitor.yaml index e215a3c2f..44a4c6a26 100644 --- a/clusters/cl01tl/platform/matrix-synapse/templates/service-monitor.yaml +++ b/clusters/cl01tl/platform/matrix-synapse/templates/service-monitor.yaml @@ -19,3 +19,26 @@ spec: matchLabels: app.kubernetes.io/name: matrix-synapse app.kubernetes.io/instance: {{ .Release.Name }} + +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: matrix-hookshot + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: matrix-hookshot + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: web + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + endpoints: + - port: metrics + interval: 15s + scrapeTimeout: 5s + path: /metrics + selector: + matchLabels: + app.kubernetes.io/name: matrix-hookshot + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/clusters/cl01tl/platform/matrix-synapse/values.yaml b/clusters/cl01tl/platform/matrix-synapse/values.yaml index 12002961f..158aa521c 100644 --- a/clusters/cl01tl/platform/matrix-synapse/values.yaml +++ b/clusters/cl01tl/platform/matrix-synapse/values.yaml @@ -33,7 +33,7 @@ matrix-synapse: secretName: mautrix-discord-config-secret - name: mautrix-whatsapp-config-secret secret: - secretName: mautrix-whatsapp-config-secret + secretName: mautrix-whatsapp-config-secret extraVolumeMounts: - name: matrix-synapse-config-secret mountPath: /synapse/config/conf.d/oidc.yaml @@ -54,7 +54,7 @@ matrix-synapse: - name: mautrix-whatsapp-config-secret mountPath: /synapse/config/conf.d/mautrix-whatsapp-registration.yaml subPath: mautrix-whatsapp-registration.yaml - readOnly: true + readOnly: true resources: requests: cpu: 100m @@ -109,52 +109,176 @@ matrix-synapse: ingress: enabled: false matrix-hookshot: - deployment: - resources: - requests: - cpu: 100m - memory: 128Mi - ingress: - webhook: - enabled: false - appservice: - enabled: false - metrics: - enabled: true - serviceMonitor: + controllers: + main: + type: deployment + replicas: 1 + strategy: Recreate + revisionHistoryLimit: 3 + containers: + main: + image: + repository: halfshot/matrix-hookshot + tag: 5.3.0 + pullPolicy: IfNotPresent + resources: + requests: + cpu: 100m + memory: 256Mi + serviceAccount: + create: true + service: + main: + controller: main + ports: + webhook: + port: 9000 + targetPort: 9000 + protocol: HTTP + metrics: + port: 9001 + targetPort: 9001 + protocol: HTTP + appservice: + port: 9002 + targetPort: 9002 + protocol: HTTP + widgets: + port: 9003 + targetPort: 9003 + protocol: HTTP + persistence: + config: enabled: true - hookshot: - existingSecret: matrix-hookshot-config-secret - existingRegistrationSecret: matrix-hookshot-config-secret - existingPasskeySecret: matrix-hookshot-config-secret + type: secret + name: matrix-hookshot-config-secret + advancedMounts: + main: + main: + - path: /data/config.yml + readOnly: true + mountPropagation: None + subPath: config.yml + registration: + enabled: true + type: secret + name: matrix-hookshot-config-secret + advancedMounts: + main: + main: + - path: /data/registration.yml + readOnly: true + mountPropagation: None + subPath: registration.yml + passkey: + enabled: true + type: secret + name: matrix-hookshot-config-secret + advancedMounts: + main: + main: + - path: /data/passkey.pem + readOnly: true + mountPropagation: None + subPath: passkey.pem mautrix-discord: - deployment: - resources: - requests: - cpu: 100m - memory: 128Mi - ingress: - enabled: false + controllers: + main: + type: deployment + replicas: 1 + strategy: Recreate + revisionHistoryLimit: 3 + containers: + main: + image: + repository: dock.mau.dev/mautrix/discord + tag: v0.6.5 + pullPolicy: IfNotPresent + resources: + requests: + cpu: 100m + memory: 256Mi + serviceAccount: + create: true + service: + main: + controller: main + ports: + http: + port: 29334 + targetPort: 29334 + protocol: HTTP persistence: - enabled: ture - storageClass: ceph-block - size: 500Mi - mautrixDiscord: - existingSecret: mautrix-discord-config-secret + data: + storageClass: ceph-block + accessMode: ReadWriteOnce + size: 500Mi + retain: true + advancedMounts: + main: + main: + - path: /data + readOnly: false + config: + enabled: true + type: secret + name: mautrix-discord-config-secret + advancedMounts: + main: + main: + - path: /data/config.yml + readOnly: true + mountPropagation: None + subPath: config.yml mautrix-whatsapp: - deployment: - resources: - requests: - cpu: 100m - memory: 128Mi - ingress: - enabled: false + controllers: + main: + type: deployment + replicas: 1 + strategy: Recreate + revisionHistoryLimit: 3 + containers: + main: + image: + repository: dock.mau.dev/mautrix/whatsapp + tag: v0.10.7 + pullPolicy: IfNotPresent + resources: + requests: + cpu: 100m + memory: 256Mi + serviceAccount: + create: true + service: + main: + controller: main + ports: + http: + port: 29334 + targetPort: 29334 + protocol: HTTP persistence: - enabled: ture - storageClass: ceph-block - size: 500Mi - mautrixWhatsapp: - existingSecret: mautrix-whatsapp-config-secret + data: + storageClass: ceph-block + accessMode: ReadWriteOnce + size: 500Mi + retain: true + advancedMounts: + main: + main: + - path: /data + readOnly: false + config: + enabled: true + type: secret + name: mautrix-whatsapp-config-secret + advancedMounts: + main: + main: + - path: /data/config.yml + readOnly: true + mountPropagation: None + subPath: config.yml redis: architecture: standalone auth: @@ -167,6 +291,12 @@ redis: replica: persistence: enabled: false +cloudflared-synapse: + name: cloudflared-synapse + existingSecretName: matrix-synapse-cloudflared-synapse-secret +cloudflared-hookshot: + name: cloudflared-hookshot + existingSecretName: matrix-synapse-cloudflared-hookshot-secret postgres-16-cluster: mode: standalone cluster: @@ -185,9 +315,3 @@ postgres-16-cluster: endpointCredentials: matrix-synapse-postgresql-16-cluster-backup-secret backupIndex: 1 retentionPolicy: 14d -cloudflared-synapse: - name: cloudflared-synapse - existingSecretName: matrix-synapse-cloudflared-synapse-secret -cloudflared-hookshot: - name: cloudflared-hookshot - existingSecretName: matrix-synapse-cloudflared-hookshot-secret