133 lines
4.8 KiB
YAML
133 lines
4.8 KiB
YAML
{{- if .Values.bridge.slack.enabled }}
|
||
---
|
||
apiVersion: helm.toolkit.fluxcd.io/v2beta2
|
||
kind: HelmRelease
|
||
metadata:
|
||
name: "{{ .Release.Name }}-mautrix-slack"
|
||
spec:
|
||
chart:
|
||
spec:
|
||
sourceRef:
|
||
kind: GitRepository
|
||
name: "wrenix-helm-charts"
|
||
namespace: "flux-system"
|
||
chart: "./mautrix-signal"
|
||
reconcileStrategy: "Revision"
|
||
install:
|
||
{{- toYaml .Values.commons.helm.release.install | nindent 4 }}
|
||
test:
|
||
{{- toYaml .Values.commons.helm.release.test | nindent 4 }}
|
||
upgrade:
|
||
{{- toYaml .Values.commons.helm.release.upgrade | nindent 4 }}
|
||
driftDetection:
|
||
{{- toYaml .Values.commons.helm.release.driftDetection | nindent 4 }}
|
||
interval: 10m
|
||
valuesFrom:
|
||
- kind: Secret
|
||
name: "{{ .Release.Name }}-mautrix-slack-mautrix-signal"
|
||
valuesKey: as_token
|
||
targetPath: config.appservice.as_token
|
||
optional: true
|
||
- kind: Secret
|
||
name: "{{ .Release.Name }}-mautrix-slack-mautrix-signal"
|
||
valuesKey: hs_token
|
||
targetPath: config.appservice.hs_token
|
||
optional: true
|
||
- kind: Secret
|
||
name: "{{ .Release.Name }}-doublepuppet"
|
||
valuesKey: as_token_code
|
||
targetPath: config.double_puppet.secrets.{{ include "mycloud-matrix.domain" . | replace "." "\\." }}
|
||
values:
|
||
image:
|
||
repository: "mautrix/slack"
|
||
tag: "v0.1.2"
|
||
config:
|
||
database:
|
||
type: postgres
|
||
{{- $username := .Values.databases.bridge.slack.username }}
|
||
{{- $password := .Values.databases.bridge.slack.password | default (derivePassword 1 "long" .Values.commons.masterPassword "matrix-bridge-slack" "database_password" | b64enc) }}
|
||
{{- $host := .Values.databases.bridge.slack.host }}
|
||
{{- $database := .Values.databases.bridge.slack.name }}
|
||
uri: {{ printf "postgres://%s:%s@%s/%s?sslmode=disable" $username $password $host $database | quote }}
|
||
homeserver:
|
||
address: https://{{ include "mycloud-matrix.host.server" . }}
|
||
domain: {{ include "mycloud-matrix.domain" . }}
|
||
appservice:
|
||
address: http://{{ .Release.Name }}-mautrix-slack-mautrix-signal:29328
|
||
id: slack
|
||
{{`
|
||
username_template: "slack_{{.}}"
|
||
`}}
|
||
bot:
|
||
avatar: "mxc://maunium.net/pVtzLmChZejGxLqmXtQjFxem"
|
||
username: slackbot
|
||
displayname: "Slack bridge bot"
|
||
bridge:
|
||
personal_filtering_spaces: true
|
||
command_prefix: "!slack"
|
||
relay:
|
||
enabled: true
|
||
permissions:
|
||
"example.com": null
|
||
"@admin:example.com": null
|
||
{{ include "mycloud-matrix.domain" . | quote}}: user
|
||
{{- range $user := .Values.bridge.slack.admins }}
|
||
{{ $user | quote }}: admin
|
||
{{- end }}
|
||
management_room_text:
|
||
welcome: "Hello, I’m a Slack bridge bot."
|
||
matrix:
|
||
sync_direct_chat_list: true
|
||
double_puppet:
|
||
servers:
|
||
example.com: null
|
||
{{ include "mycloud-matrix.domain" . }}: https://{{ include "mycloud-matrix.host.server" . }}
|
||
secrets:
|
||
example.com: null
|
||
{{- if not .Values.server.authenticationService.enabled }}
|
||
encryption:
|
||
allow: true
|
||
default: true
|
||
require: true
|
||
delete_keys:
|
||
periodically_delete_expired: true
|
||
{{- end }}
|
||
signal: null
|
||
{{`
|
||
slack:
|
||
displayname_template: '{{or .Profile.DisplayName .Profile.RealName .Name}}{{if .IsBot}} (bot){{end}}'
|
||
channel_name_template: '{{if and .IsChannel (not .IsPrivate)}}#{{end}}{{.Name}}{{if .IsNoteToSelf}} (you){{end}}'
|
||
team_name_template: "{{ .Name }}"
|
||
custom_emoji_reactions: true
|
||
workspace_avatar_in_rooms: false
|
||
participant_sync_count: 5
|
||
participant_sync_only_on_create: true
|
||
mute_channels_by_default: false
|
||
backfill:
|
||
conversation_count: -1
|
||
`}}
|
||
|
||
registration:
|
||
namespaces:
|
||
users:
|
||
- regex: {{ printf "^@slackbot:%s$" (include "mycloud-matrix.domain" . | replace "." "\\.") | quote }}
|
||
exclusive: true
|
||
- regex: {{ printf "^@slack_.*:%s$" (include "mycloud-matrix.domain" . | replace "." "\\.") | quote }}
|
||
exclusive: true
|
||
|
||
persistence:
|
||
enabled: true
|
||
size: {{ .Values.persistence.size }}
|
||
{{- with .Values.persistence.storageClass | default .Values.commons.persistence.storageClass }}
|
||
storageClass: {{ . }}
|
||
{{- end }}
|
||
{{- if .Values.commons.persistence.hostPath.enabled }}
|
||
hostPath: "{{ .Values.commons.persistence.hostPath.prefix }}/matrix/bridge/slack"
|
||
{{- end }}
|
||
|
||
prometheus:
|
||
servicemonitor:
|
||
enabled: {{ (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}
|
||
labels:
|
||
{{- toYaml .Values.commons.prometheus.monitor.labels | nindent 10 }}
|
||
{{- end }}{{/* end-if .bridge.slack.enabled */}}
|