Specify server_name via globals

This commit is contained in:
Ben Banfield-Zanin committed 2024-11-15 10:37:35 +00:00
1 parent 126ee7b1e8
commit fe3a89ac70
13 files changed
+80 -15

No files matched your search

@@ -2,6 +2,10 @@
#
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
global:
ess:
server_name: ess.localhost
defaultMatrixServer:
baseUrl: https://synapse.ess.localhost
@@ -2,6 +2,10 @@
#
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
global:
ess:
server_name: ess.localhost
defaultMatrixServer:
baseUrl: https://synapse.ess.localhost
@@ -20,9 +20,6 @@
"properties": {
"baseUrl": {
"type": "string"
},
"serverName": {
"type": "string"
}
},
"type": "object"
+1 -3
View File
@@ -5,6 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
#}
{% import 'sub_schema_values.yaml.j2' as sub_schema_values -%}
{{ sub_schema_values.generatedFileWarning() }}
{{ sub_schema_values.global() }}
## Arbitrary extra config to inject into Element Web's config.json a a YAML/JSON object
additional: {}
@@ -14,9 +15,6 @@ defaultMatrixServer: {}
## URL where the Matrix server is hosted
# baseUrl:
## Server name of the default Matrix server (if distinct from the baseUrl)
# serverName:
# Number of Element Web replicas to start up
replicas: 2
{{ sub_schema_values.image(registry='docker.io', repository='vectorim/element-web') }}
+1 -1
View File
@@ -12,8 +12,8 @@ app.kubernetes.io/version: {{ .Values.image.tag | default $.Chart.AppVersion }}
{{- define "element-io.element-web.config" }}
{{- $config := dict }}
{{- $serverName := required "Element Web requires global.ess.server_name set" .Values.global.ess.server_name }}
{{- with .Values.defaultMatrixServer }}
{{- $serverName := .serverName | default .baseUrl }}
{{- $mHomeserver := dict "base_url" .baseUrl "server_name" $serverName }}
{{- $defaultServerConfig := dict "m.homeserver" $mHomeserver -}}
{{- $_ := set $config "default_server_config" $defaultServerConfig }}
+12 -4
View File
@@ -21,9 +21,6 @@
"properties": {
"baseUrl": {
"type": "string"
},
"serverName": {
"type": "string"
}
},
"type": "object",
@@ -35,7 +32,18 @@
},
"global": {
"type": "object",
"additionalProperties": false
"additionalProperties": true,
"properties": {
"ess": {
"type": "object",
"properties": {
"server_name": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"image": {
"type": "object",
+8 -3
View File
@@ -4,6 +4,14 @@
# This file is generated. Do not edit directly. Edit source/values.yaml.j2 instead to make changes
## Global values available to all sub-charts
global:
## ESS specific globals, namespaced to avoid interference with other charts
ess: {}
## The server name of the Matrix Stack. This gets embedded in user IDs & room IDs
## It can not change after the initial deployment.
# server_name: ess.localhost
## Arbitrary extra config to inject into Element Web's config.json a a YAML/JSON object
additional: {}
@@ -12,9 +20,6 @@ defaultMatrixServer: {}
## URL where the Matrix server is hosted
# baseUrl:
## Server name of the default Matrix server (if distinct from the baseUrl)
# serverName:
# Number of Element Web replicas to start up
replicas: 2
@@ -3,6 +3,9 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"global": {
"$ref": "file://./../../matrix-stack/sub_schemas/global.json"
},
"element-web": {
"type": "object",
"additionalProperties": true,
@@ -5,6 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
#}
{% import 'sub_schema_values.yaml.j2' as sub_schema_values -%}
{{ sub_schema_values.generatedFileWarning() }}
{{ sub_schema_values.global() }}
element-web:
enabled: true
+12 -1
View File
@@ -1,3 +1,14 @@
{
"type": "object"
"type": "object",
"additionalProperties": true,
"properties": {
"ess": {
"type": "object",
"properties": {
"server_name": {
"type": "string"
}
}
}
}
}
@@ -8,6 +8,17 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# This file is generated. Do not edit directly. Edit source/values.yaml.j2 instead to make changes
{%- endmacro %}
{% macro global() %}
## Global values available to all sub-charts
global:
## ESS specific globals, namespaced to avoid interference with other charts
ess: {}
## The server name of the Matrix Stack. This gets embedded in user IDs & room IDs
## It can not change after the initial deployment.
# server_name: ess.localhost
{%- endmacro %}
{% macro containersSecurityContext(key='containersSecurityContext') %}
## A subset of SecurityContext. ContainersSecurityContext holds pod-level security attributes and common container settings
{{ key }}:
+15
View File
@@ -3,6 +3,21 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"global": {
"type": "object",
"additionalProperties": true,
"properties": {
"ess": {
"type": "object",
"properties": {
"server_name": {
"type": "string"
}
},
"additionalProperties": false
}
}
},
"element-web": {
"type": "object",
"additionalProperties": true,
+8
View File
@@ -4,5 +4,13 @@
# This file is generated. Do not edit directly. Edit source/values.yaml.j2 instead to make changes
## Global values available to all sub-charts
global:
## ESS specific globals, namespaced to avoid interference with other charts
ess: {}
## The server name of the Matrix Stack. This gets embedded in user IDs & room IDs
## It can not change after the initial deployment.
# server_name: ess.localhost
element-web:
enabled: true