Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sliding sync and mas for matrix into a beta directory #848

Merged
merged 18 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions matrix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@

### Networking view
<img width="1390" alt="screenshot of the Argo CD web interface showing the matrix web app in networking view mode. It shows a cloud on the left flowing into a box that says 192.168.168.168 which branches off into three ingress resources: matrix stack element, matrix stack synapse, and matrix stack synapse federation. The ingress resource for element, branches off into a service of the same name and then a pod of the same name. The synapse and synapse federation ingress resources branch off into two respective services that branch off into one shared pod called matrix stack synapse." src="https://github.com/small-hack/argocd-apps/assets/2389292/07217b21-4945-4426-8ea9-d5f41f6ca7f7">

</details>

</details>

We're using [small-hack/matrix-chart](https://github.com/small-hack/matrix-chart), which is a fork of [Arkaniad/matrix-chart](https://github.com/Arkaniad), which is a fork of [typokign/matrix-chart](https://github.com/typokign/matrix-chart) (no longer maintained).

Expand All @@ -23,3 +22,9 @@ We're using [small-hack/matrix-chart](https://github.com/small-hack/matrix-chart
| 1 | External Secrets and Persistent volumes |
| 2 | Postgresql cluster |
| 3 | Matrix |

## Notes

To use the stable version of synapse and element, use the [`app_of_apps`](./app_of_apps) directory, however if you'd like to try to the new [element-x](https://matrix.org/ecosystem/clients/element-x/), you'll want to use the [`app_of_apps_beta`](./app_of_apps_beta) directory until all is declared live and stable.

`app_of_apps_beta` will use [matrix authentication service](https://matrix-org.github.io/matrix-authentication-service) for OIDC instead of the current OIDC implementation baked into synapse, which you can read more about on the [matrix.org blog](https://matrix.org/blog/2023/09/better-auth/#upgrading-to-use-matrix-authentication-service). It also uses [sliding sync](https://github.com/matrix-org/sliding-sync/tree/main) which is supposed to be faster at syncing large rooms.
28 changes: 8 additions & 20 deletions matrix/app_of_apps/matrix_argocd_appset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ spec:
selfHeal: true
source:
repoURL: 'https://small-hack.github.io/matrix-chart'
# repoURL: 'https://github.com/small-hack/matrix-chart'
targetRevision: 8.2.0
# targetRevision: add-sliding-sync-subchart
# path: charts/matrix/
chart: matrix
helm:
valuesObject:
Expand Down Expand Up @@ -162,9 +165,8 @@ spec:

# Settings for the URL preview crawler
urlPreviews:
# -- Enable URL previews. WARN: Make sure to review default rules below to
# ensure that users cannot crawl sensitive internal endpoints on yr cluster
enabled: false
# WARNING: review rules below
enabled: true

# Blacklists and whitelists for the URL preview crawler
rules:
Expand Down Expand Up @@ -468,29 +470,18 @@ spec:
integrations:
# -- enables the Integrations menu, including:
# widgets, bots, and other plugins to Element
enabled: true
# -- UI to load when a user selects the Integrations button at the top-right
# of a room
ui: "https://scalar.vector.im/"
# -- API for the integration server
api: "https://scalar.vector.im/api"
# -- Array of API paths providing widgets
widgets:
- "https://scalar.vector.im/_matrix/integrations/v1"
- "https://scalar.vector.im/api"
- "https://scalar-staging.vector.im/_matrix/integrations/v1"
- "https://scalar-staging.vector.im/api"
- "https://scalar-staging.element.im/scalar/api"
enabled: false

# -- Experimental features in Element, see:
# https://github.com/vector-im/element-web/blob/develop/docs/labs.md
labs:
- feature_report_to_moderators
- feature_pinning
- feature_state_counters
- feature_mjolnir
- feature_disable_call_per_sender_encryption
- feature_dm_verification
- feature_bridge_state
- feature_html_topic
- feature_custom_themes
- feature_jump_to_date
- feature_video_rooms
Expand Down Expand Up @@ -557,9 +548,6 @@ spec:
irc:
# -- Set to true to enable the IRC bridge
enabled: false
whatsapp:
# -- Set to true to enable the WhatsApp bridge
enabled: false
discord:
# -- Set to true to enable the Discord bridge
enabled: false
Expand Down
60 changes: 60 additions & 0 deletions matrix/app_of_apps_beta/external_secrets_argocd_appset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: matrix-external-secrets-app-set
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
goTemplate: true
# generator allows us to source specific values from an external k8s secret
generators:
- plugin:
configMapRef:
name: secret-var-plugin-generator
input:
parameters:
secret_vars:
- global_external_secrets
- matrix_oidc_credentials_bitwarden_id
- matrix_authentication_service_credentials_bitwarden_id
- matrix_postgres_credentials_bitwarden_id
- matrix_registration_credentials_bitwarden_id
- matrix_s3_provider
- matrix_s3_admin_credentials_bitwarden_id
- matrix_s3_matrix_credentials_bitwarden_id
- matrix_s3_postgres_credentials_bitwarden_id
- matrix_s3_backups_credentials_bitwarden_id
- matrix_smtp_credentials_bitwarden_id
template:
metadata:
name: matrix-external-secrets
spec:
project: matrix
destination:
server: https://kubernetes.default.svc
namespace: matrix
syncPolicy:
syncOptions:
- ApplyOutOfSyncOnly=true
automated:
prune: true
selfHeal: true
source:
repoURL: 'https://github.com/small-hack/argocd-apps.git'
path: matrix/external_secrets/
targetRevision: main
helm:
valuesObject:
provider: '{{ .global_external_secrets }}'
postgresqlCredentialsBitwardenID: '{{ .matrix_postgres_credentials_bitwarden_id }}'
matrixAuthenticationServiceBitwardenID: '{{ .matrix_authentication_service_credentials_bitwarden_id }}'
oidcCredentialsBitwardenID: '{{ .matrix_oidc_credentials_bitwarden_id }}'
smtpCredentialsBitwardenID: '{{ .matrix_smtp_credentials_bitwarden_id }}'
registrationBitwardenID: '{{ .matrix_registration_credentials_bitwarden_id }}'
s3_provider: '{{ .matrix_s3_provider }}'
s3AdminCredentialsBitwardenID: '{{ .matrix_s3_admin_credentials_bitwarden_id }}'
s3MatrixCredentialsBitwardenID: '{{ .matrix_s3_matrix_credentials_bitwarden_id }}'
s3PostgresCredentialsBitwardenID: '{{ .matrix_s3_postgres_credentials_bitwarden_id }}'
s3BackupCredentialsBitwardenID: '{{ .matrix_s3_backups_credentials_bitwarden_id }}'
Loading