-a(matrix-synapse): support well-known for element

This commit is contained in:
WrenIX 2024-08-23 19:09:49 +02:00
parent b9234328e9
commit 4e67ed133e
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
6 changed files with 29 additions and 3 deletions

View file

@ -4,7 +4,7 @@ name: matrix-synapse
description: Matrix reference homeserver description: Matrix reference homeserver
icon: https://matrix.org/images/matrix-logo.svg icon: https://matrix.org/images/matrix-logo.svg
type: application type: application
version: 0.2.8 version: 0.3.0
# renovate: image=ghcr.io/element-hq/synapse # renovate: image=ghcr.io/element-hq/synapse
appVersion: 1.101.0 appVersion: 1.101.0
maintainers: maintainers:

View file

@ -2,7 +2,7 @@
= matrix-synapse = matrix-synapse
image::https://img.shields.io/badge/Version-0.2.8-informational?style=flat-square[Version: 0.2.8] image::https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square[Version: 0.3.0]
image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application] image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application]
image::https://img.shields.io/badge/AppVersion-1.101.0-informational?style=flat-square[AppVersion: 1.101.0] image::https://img.shields.io/badge/AppVersion-1.101.0-informational?style=flat-square[AppVersion: 1.101.0]
== Maintainers == Maintainers
@ -597,6 +597,11 @@ helm uninstall matrix-synapse-release
| `80` | `80`
| |
| wellknown.element
| object
| `{}`
| Data to serve on .well-known/element/element.json call: widget_url: https://call.element.io
| wellknown.enabled | wellknown.enabled
| bool | bool
| `false` | `false`

View file

@ -176,6 +176,18 @@ spec:
serviceName: {{ $wkName }} serviceName: {{ $wkName }}
servicePort: {{ $.Values.wellknown.service.port | default 80 }} servicePort: {{ $.Values.wellknown.service.port | default 80 }}
{{- end }} {{- end }}
- path: /.well-known/element
backend:
{{- if $v1Ingress }}
service:
name: {{ $wkName }}
port:
number: {{ $.Values.wellknown.service.port | default 80 }}
pathType: Prefix
{{- else }}
serviceName: {{ $wkName }}
servicePort: {{ $.Values.wellknown.service.port | default 80 }}
{{- end }}
{{- else }} {{- else }}
- path: /.well-known/matrix - path: /.well-known/matrix
backend: backend:

View file

@ -20,5 +20,7 @@ data:
{{- else }} {{- else }}
{{- dict "m.homeserver" (dict "base_url" (printf "https://%s/" (.Values.publicServerName | default .Values.serverName))) | toJson | nindent 4 }} {{- dict "m.homeserver" (dict "base_url" (printf "https://%s/" (.Values.publicServerName | default .Values.serverName))) | toJson | nindent 4 }}
{{- end }} {{- end }}
{{- (.Files.Glob "files/well-known/*" ).AsConfig | nindent 2 }} element.json: |-
{{- toJson .Values.wellknown.element | nindent 4 }}
{{- (.Files.Glob "files/well-known/nginx.conf" ).AsConfig | nindent 2 }}
{{- end -}}{{/* end-if .wellknown.enabled */}} {{- end -}}{{/* end-if .wellknown.enabled */}}

View file

@ -60,6 +60,9 @@ spec:
- name: "data" - name: "data"
mountPath: "/usr/share/nginx/html/.well-known/matrix/server" mountPath: "/usr/share/nginx/html/.well-known/matrix/server"
subPath: "server" subPath: "server"
- name: "data"
mountPath: "/usr/share/nginx/html/.well-known/element/element.json"
subPath: "element.json"
- name: "data" - name: "data"
mountPath: "/etc/nginx/conf.d/default.conf" mountPath: "/etc/nginx/conf.d/default.conf"
subPath: "nginx.conf" subPath: "nginx.conf"

View file

@ -641,6 +641,10 @@ wellknown:
# m.homeserver: # m.homeserver:
# base_url: https://matrix.example.com # base_url: https://matrix.example.com
client: {} client: {}
# -- Data to serve on .well-known/element/element.json
# call:
# widget_url: https://call.element.io
element: {}
## This configuration is for setting up the internally provided Postgres server, ## This configuration is for setting up the internally provided Postgres server,
## if you instead want to use an existing server, then you may want to set ## if you instead want to use an existing server, then you may want to set