Merge "app/matrix: make riotConfig parametrizable"

master
not7cd 2020-11-08 15:39:01 +00:00 committed by Gerrit Code Review
commit 8a504b1bc2
1 changed files with 33 additions and 31 deletions

View File

@ -211,38 +211,40 @@ local postgres = import "../../../kube/postgres.libsonnet";
target_pod:: app.synapseDeployment.spec.template,
},
riotConfig: kube.ConfigMap("riot-web-config") {
riotConfig:: {
"default_hs_url": "https://%s" % [cfg.webDomain],
"disable_custom_urls": false,
"disable_guests": false,
"disable_login_language_selector": false,
"disable_3pid_login": true,
"brand": "Riot",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"features": {
"feature_groups": "labs",
"feature_pinning": "labs",
"feature_reactions": "labs"
},
"default_federate": true,
"default_theme": "light",
"roomDirectory": {
"servers": [
cfg.serverName,
]
},
"welcomeUserId": "@riot-bot:matrix.org",
"enable_presence_by_hs_url": {
"https://matrix.org": false
}
},
riotConfigMap: kube.ConfigMap("riot-web-config") {
metadata+: app.metadata("riot-web-config"),
data: {
"config.json": std.manifestJsonEx({
"default_hs_url": "https://%s" % [cfg.webDomain],
"disable_custom_urls": false,
"disable_guests": false,
"disable_login_language_selector": false,
"disable_3pid_login": true,
"brand": "Riot",
"integrations_ui_url": "https://scalar.vector.im/",
"integrations_rest_url": "https://scalar.vector.im/api",
"integrations_jitsi_widget_url": "https://scalar.vector.im/api/widgets/jitsi.html",
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"features": {
"feature_groups": "labs",
"feature_pinning": "labs",
"feature_reactions": "labs"
},
"default_federate": true,
"default_theme": "light",
"roomDirectory": {
"servers": [
cfg.serverName,
]
},
"welcomeUserId": "@riot-bot:matrix.org",
"enable_presence_by_hs_url": {
"https://matrix.org": false
}
}, ""),
"config.json": std.manifestJsonEx(app.riotConfig, ""),
// Standard nginx.conf, made to work when running as unprivileged user.
"nginx.conf": |||
worker_processes auto;
@ -297,7 +299,7 @@ local postgres = import "../../../kube/postgres.libsonnet";
template+: {
spec+: {
volumes_: {
config: kube.ConfigMapVolume(app.riotConfig),
config: kube.ConfigMapVolume(app.riotConfigMap),
},
containers_: {
web: kube.Container("riot-web") {