[dendrite] Update to v0.8.1 (#1507)

* Update to Dendrite 0.8.1

* Use default values

* Fix intellisense error

* Remove EDU Server from list

* Add healthchecks

* Remove unused databases

* Update values to use Postgres chart 11.0

* Add newline

* Bump version to 4.1.0

* Change kind

* Only include common.all once, fix indention

* Fix postgres

* Whitespaces..
This commit is contained in:
Till 2022-04-19 16:24:17 +02:00 committed by GitHub
parent 5bccd66201
commit 10f2dca826
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 100 additions and 49 deletions

View File

@ -1,9 +1,9 @@
---
apiVersion: v2
appVersion: v0.6.3
appVersion: v0.8.1
description: Dendrite Matrix Homeserver
name: dendrite
version: 4.0.0
version: 4.1.0
kubeVersion: ">=1.16.0-0"
keywords:
- dendrite
@ -55,12 +55,6 @@ dependencies:
version: 4.3.0
alias: roomserver
condition: dendrite.polylithEnabled
# EDU Server
- name: common
repository: https://library-charts.k8s-at-home.com
version: 4.3.0
alias: eduserver
condition: dendrite.polylithEnabled
# Federation API
- name: common
repository: https://library-charts.k8s-at-home.com
@ -88,4 +82,10 @@ dependencies:
annotations:
artifacthub.io/changes: |
- kind: changed
description: Upgraded `postgresql` chart dependency to version `11.1.15`.
description: Update to Dendrite 0.8.1
- kind: added
description: Added healthchecks
- kind: removed
description: Removed unused database from config & initdb script
- kind: removed
description: Removed EDU Server

View File

@ -1,5 +1,5 @@
{{- if .Values.dendrite.polylithEnabled }}
{{ $components := list "clientapi" "appserviceapi" "federationapi" "userapi" "keyserver" "mediaapi" "syncapi" "roomserver" "eduserver" }}
{{ $components := list "clientapi" "appserviceapi" "federationapi" "userapi" "keyserver" "mediaapi" "syncapi" "roomserver" }}
{{- range $components }}
{{- include "common.values.setup" (index $.Subcharts .) }}
{{- with (index $.Values .) }}
@ -26,3 +26,52 @@
{{- $_ := set .Values.persistence "dendrite-tls" (include "dendrite.tlsVolume" . | fromYaml) -}}
{{ include "common.all" . }}
{{- end }}
{{- define "dendrite.hardcodedValues" -}}
probes:
liveness:
enabled: true
custom: true
spec:
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 10
httpGet:
path: /_dendrite/monitor/health
{{- if .Values.dendrite.polylithEnabled }}
port: internal
{{ else }}
port: http
{{ end }}
readiness:
enabled: true
custom: true
spec:
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 10
httpGet:
path: /_dendrite/monitor/health
{{- if .Values.dendrite.polylithEnabled }}
port: internal
{{ else }}
port: http
{{ end }}
startup:
enabled: true
custom: true
spec:
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 10
httpGet:
path: /_dendrite/monitor/up
{{- if .Values.dendrite.polylithEnabled }}
port: internal
{{ else }}
port: http
{{ end }}
{{- end -}}
{{- $_ := mergeOverwrite .Values (include "dendrite.hardcodedValues" . | fromYaml) -}}

View File

@ -1,6 +1,6 @@
{{- $connectionString := "file:" -}}
{{- if .Values.postgresql.enabled}}
{{- $connectionString = print "postgresql://" .Values.postgresql.postgresqlUsername ":" .Values.postgresql.postgresqlPassword "@" (include "common.names.fullname" .) "-postgresql/" -}}
{{- $connectionString = print "postgresql://" .Values.postgresql.auth.username ":" .Values.postgresql.auth.password "@" (include "common.names.fullname" .) "-postgresql/" -}}
{{- end}}
---
apiVersion: v1
@ -18,6 +18,16 @@ stringData:
well_known_server_name: {{ default "" .Values.dendrite.global.well_known_server_name | quote }}
trusted_third_party_id_servers:
{{- toYaml .Values.dendrite.global.trusted_third_party_id_servers | nindent 8 }}
disable_federation: {{ default false .Values.dendrite.global.disable_federation }}
presence:
enable_inbound: {{ default false .Values.dendrite.global.presence.enable_inbound}}
enable_outbound: {{ default false .Values.dendrite.global.presence.enable_outbound }}
server_notices:
enabled: {{ default false .Values.dendrite.global.server_notices.enabled }}
local_part: {{ default "_server" .Values.dendrite.global.server_notices.local_part | quote }}
display_name: {{ default "Server alerts" .Values.dendrite.global.server_notices.display_name | quote }}
avatar_url: {{ default "" .Values.dendrite.global.server_notices.avatar_url | quote }}
room_name: {{ default "Server Alerts" .Values.dendrite.global.server_notices.room_name | quote }}
jetstream:
addresses:
{{- if .Values.nats.enabled }}
@ -65,10 +75,6 @@ stringData:
enabled: {{ default true .Values.clientapi.config.rate_limiting.enabled }}
threshold: {{ default 5 .Values.clientapi.config.rate_limiting.threshold }}
cooloff_ms: {{ default 500 .Values.clientapi.config.rate_limiting.cooloff_ms }}
edu_server:
internal_api:
listen: http://0.0.0.0:7778
connect: http://{{ include "common.names.fullname" . }}-eduserver:7778
federation_api:
internal_api:
listen: http://0.0.0.0:7772
@ -151,11 +157,6 @@ stringData:
max_open_conns: {{ .Values.dendrite.database.max_open_conns }}
max_idle_conns: {{ .Values.dendrite.database.max_idle_conns }}
conn_max_lifetime: {{ .Values.dendrite.database.conn_max_lifetime }}
device_database:
connection_string: {{ $connectionString }}dendrite_userapi_devices?sslmode=disable
max_open_conns: {{ .Values.dendrite.database.max_open_conns }}
max_idle_conns: {{ .Values.dendrite.database.max_idle_conns }}
conn_max_lifetime: {{ .Values.dendrite.database.conn_max_lifetime }}
tracing:
enabled: {{ .Values.dendrite.tracing.enabled }}
jaeger: {{- toYaml .Values.dendrite.tracing.jaeger | nindent 8 }}

View File

@ -4,11 +4,11 @@ apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: null
name: {{ .Values.postgresql.initdbScriptsConfigMap | quote }}
name: {{ .Values.postgresql.primary.initdb.scriptsConfigMap | quote }}
data:
create-db.sh: |
#!/bin/sh
for db in userapi_accounts userapi_devices mediaapi syncapi roomserver keyserver federationapi appservice naffka; do
createdb -U {{ .Values.postgresql.postgresqlUsername }} -O {{ .Values.postgresql.postgresqlUsername }} dendrite_$db
for db in userapi_accounts mediaapi syncapi roomserver keyserver federationapi appservice; do
createdb -U {{ .Values.postgresql.auth.username }} -O {{ .Values.postgresql.auth.username }} dendrite_$db
done
{{- end }}

View File

@ -267,28 +267,6 @@ roomserver:
port: 7770
args: "roomserver"
# -- Configure the edu server
# For more information see [the sample dendrite configuration](https://github.com/matrix-org/dendrite/blob/master/build/docker/config/dendrite-config.yaml)
# @default -- values.yaml
eduserver:
image:
# -- image repository
repository: matrixdotorg/dendrite-polylith
# -- image tag
# @default -- chart.appVersion
tag:
# -- image pull policy
pullPolicy: IfNotPresent
service:
main:
ports:
http:
enabled: false
internal:
enabled: true
port: 7778
args: "eduserver"
# -- Configure the Media API
# For more information see [the sample dendrite configuration](https://github.com/matrix-org/dendrite/blob/master/build/docker/config/dendrite-config.yaml)
# @default -- values.yaml
@ -374,6 +352,26 @@ dendrite:
trusted_third_party_id_servers:
- matrix.org
- vector.im
# -- Disables federation
disable_federation: false
# -- Configure handling of presence events
presence:
# -- Whether inbound presence events are allowed, e.g. receiving presence events from other servers
enable_inbound: false
# -- Whether outbound presence events are allowed, e.g. sending presence events to other servers
enable_outbound: false
# -- Server notices allows server admins to send messages to all users.
server_notices:
enabled: false
# -- The server localpart to be used when sending notices, ensure this is not yet taken
local_part: "_server"
# -- The displayname to be used when sending notices
display_name: "Server alerts"
# -- The mxid of the avatar to use
avatar_url: ""
# -- The roomname to be used when creating messages
room_name: "Server Alerts"
# -- Configure prometheus metrics collection for dendrite.
# @default -- See values.yaml
metrics:
@ -424,12 +422,15 @@ postgresql:
image:
repository: bitnami/postgresql
tag: "14.1.0"
postgresqlUsername: dendrite
postgresqlPassword: changeme
postgresqlDatabase: dendrite
auth:
username: dendrite
password: changeme
database: dendrite
persistence:
enabled: false
initdbScriptsConfigMap: "dendrite-postgresql-init-scripts"
primary:
initdb:
scriptsConfigMap: "dendrite-postgresql-init-scripts"
nats:
# -- Enable and configure NATS for dendrite. Can be disabled for monolith