File tree Expand file tree Collapse file tree 11 files changed +129
-10
lines changed
matrix-authentication-service
matrix-authentication-service Expand file tree Collapse file tree 11 files changed +129
-10
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,6 @@ database:
42
42
{ {- end } }
43
43
{ {- else if $root .Values.postgres.enabled } }
44
44
uri: "postgresql://matrixauthenticationservice_user:${ POSTGRES_PASSWORD} @{ { $root .Release.Name } }-postgres.{ { $root .Release.Namespace } }.svc.cluster.local:5432/matrixauthenticationservice?sslmode=prefer&application_name=matrix-authentication-service"
45
- { { else } }
46
- { { fail " MAS requires matrixAuthenticationService.postgres.* to be configured, or the internal chart Postgres to be enabled with postgres.enabled: true" } }
47
45
{ { end } }
48
46
49
47
telemetry:
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
8
8
{ {- with required " synapse/synapse-04-homeserver-overrides.yaml.tpl missing context" .context } }
9
9
{ {- $isHook := required " element-io.synapse.config.shared-overrides requires context.isHook" .isHook -} }
10
10
public_baseurl: https://{ { tpl .ingress.host $root } }/
11
- server_name: { { tpl (required " Synapse requires serverName set " $root .Values.serverName) $root } }
11
+ server_name: { { tpl $root .Values.serverName $root } }
12
12
signing_key_path: /secrets/{ {
13
13
include " element-io.ess-library.init-secret-path" (
14
14
dict " root" $root " context" (
@@ -56,8 +56,6 @@ database:
56
56
host: "{ { $root .Release.Name } }-postgres.{ { $root .Release.Namespace } }.svc.cluster.local"
57
57
port: 5432
58
58
sslmode: prefer
59
- { { else } }
60
- { { fail " Synapse requires synapse.postgres.* to be configured, or the internal chart Postgres to be enabled with postgres.enabled: true" } }
61
59
{ { end } }
62
60
63
61
application_name: ${ APPLICATION_NAME}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ frontend well-known-in
24
24
{ { if .baseDomainRedirect.enabled } }
25
25
{ {- if $root .Values.elementWeb.enabled } }
26
26
{ {- with $root .Values.elementWeb } }
27
- { {- $elementWebHttps := include " element-io.ess-library.ingress.tlsHostsSecret" (dict " root" $root " context" (dict " hosts" (list (required " elementWeb .ingress.host is required " .ingress.host) ) " tlsSecret" .ingress.tlsSecret " ingressName" " element-web" )) } }
27
+ { {- $elementWebHttps := include " element-io.ess-library.ingress.tlsHostsSecret" (dict " root" $root " context" (dict " hosts" (list .ingress.host) " tlsSecret" .ingress.tlsSecret " ingressName" " element-web" )) } }
28
28
http-request redirect code 301 location http{ { if $elementWebHttps } }s{ { end } }://{ { tpl .ingress.host $root } } unless well-known
29
29
{ {- end } }
30
30
{ {- else if .baseDomainRedirect.url } }
Original file line number Diff line number Diff line change 1
1
{ {- /*
2
- Copyright 2024 New Vector Ltd
2
+ Copyright 2024-2025 New Vector Ltd
3
3
4
4
SPDX-License-Identifier: AGPL-3.0-only
5
5
*/ -} }
6
6
7
+ { {- define " element-io.element-web.validations" } }
8
+ { {- $root := .root -} }
9
+ { {- with required " element-io.element-web.validations missing context" .context -} }
10
+ { { $messages := list } }
11
+ { {- if not .ingress.host -} }
12
+ { { $messages = append $messages " elementWeb.ingress.host is required when elementWeb.enabled=true" } }
13
+ { {- end } }
14
+ { { $messages | toJson } }
15
+ { {- end } }
16
+ { {- end } }
17
+
7
18
{ {- define " element-io.element-web.labels" -} }
8
19
{ {- $root := .root -} }
9
20
{ {- with required " element-io.element-web.labels missing context" .context -} }
Original file line number Diff line number Diff line change @@ -4,6 +4,20 @@ Copyright 2025 New Vector Ltd
4
4
SPDX-License-Identifier: AGPL-3.0-only
5
5
*/ -} }
6
6
7
+ { {- define " element-io.matrix-authentication-service.validations" } }
8
+ { {- $root := .root -} }
9
+ { {- with required " element-io.matrix-authentication-service.validations missing context" .context -} }
10
+ { { $messages := list } }
11
+ { {- if not .ingress.host -} }
12
+ { { $messages = append $messages " matrixAuthenticationService.ingress.host is required when matrixAuthenticationService.enabled=true" } }
13
+ { {- end } }
14
+ { {- if and (not $root .Values.postgres.enabled) (not .postgres) -} }
15
+ { { $messages = append $messages " matrixAuthenticationService.postgres is required when matrixAuthenticationService.enabled=true but postgres.enabled=false" } }
16
+ { {- end } }
17
+ { { $messages | toJson } }
18
+ { {- end } }
19
+ { {- end } }
20
+
7
21
{ {- define " element-io.matrix-authentication-service.labels" -} }
8
22
{ {- $root := .root -} }
9
23
{ {- with required " element-io.matrix-authentication-service.labels missing context" .context -} }
Original file line number Diff line number Diff line change @@ -4,6 +4,17 @@ Copyright 2024-2025 New Vector Ltd
4
4
SPDX-License-Identifier: AGPL-3.0-only
5
5
*/ -} }
6
6
7
+ { {- define " element-io.matrix-rtc.validations" } }
8
+ { {- $root := .root -} }
9
+ { {- with required " element-io.matrix-rtc.validations missing context" .context -} }
10
+ { { $messages := list } }
11
+ { {- if not .ingress.host -} }
12
+ { { $messages = append $messages " matrixRTC.ingress.host is required when matrixRTC.enabled=true" } }
13
+ { {- end } }
14
+ { { $messages | toJson } }
15
+ { {- end } }
16
+ { {- end } }
17
+
7
18
{ {- define " element-io.matrix-rtc-ingress.labels" -} }
8
19
{ {- $root := .root -} }
9
20
{ {- with required " element-io.matrix-rtc.labels missing context" .context -} }
Original file line number Diff line number Diff line change 1
1
{ {- /*
2
- Copyright 2024 New Vector Ltd
2
+ Copyright 2024-2025 New Vector Ltd
3
3
4
4
SPDX-License-Identifier: AGPL-3.0-only
5
5
*/ -} }
6
6
7
+ { {- define " element-io.synapse.validations" } }
8
+ { { $root := .root } }
9
+ { {- with required " element-io.synapse.validations missing context" .context -} }
10
+ { { $messages := list } }
11
+ { {- if not .ingress.host -} }
12
+ { { $messages = append $messages " synapse.ingress.host is required when synapse.enabled=true" } }
13
+ { {- end } }
14
+ { {- if not $root .Values.serverName -} }
15
+ { { $messages = append $messages " serverName is required when synapse.enabled=true" } }
16
+ { {- end } }
17
+ { {- if and (not $root .Values.postgres.enabled) (not .postgres) -} }
18
+ { { $messages = append $messages " synapse.postgres is required when synapse.enabled=true but postgres.enabled=false" } }
19
+ { {- end } }
20
+ { { $messages | toJson } }
21
+ { {- end } }
22
+ { {- end } }
23
+
7
24
{ {- define " element-io.synapse.labels" -} }
8
25
{ {- $root := .root -} }
9
26
{ {- with required " element-io.synapse.labels missing context" .context -} }
Original file line number Diff line number Diff line change 1
1
{ {- /*
2
- Copyright 2024 New Vector Ltd
2
+ Copyright 2024-2025 New Vector Ltd
3
3
4
4
SPDX-License-Identifier: AGPL-3.0-only
5
5
*/ -} }
6
6
7
+ { {- define " element-io.well-known-delegation.validations" } }
8
+ { { $root := .root } }
9
+ { {- with required " element-io.well-known-delegation.validations missing context" .context -} }
10
+ { {- $messages := list } }
11
+ { {- if not $root .Values.serverName -} }
12
+ { { $messages = append $messages " serverName is required when wellKnownDelegation.enabled=true" } }
13
+ { {- end } }
14
+ { { $messages | toJson } }
15
+ { {- end } }
16
+ { {- end } }
17
+
7
18
{ {- define " element-io.well-known-delegation.labels" -} }
8
19
{ {- $root := .root -} }
9
20
{ {- with required " element-io.well-known-delegation.labels missing context" .context -} }
Original file line number Diff line number Diff line change
1
+ {{ $messages := list }}
2
+
3
+ {{- with $.Values.elementWeb }}
4
+ {{- if .enabled }}
5
+ {{- $messages = concat $messages (include "element-io.element-web.validations" (dict "root" $ "context" .) | fromJsonArray) }}
6
+ {{- end }}
7
+ {{- end }}
8
+
9
+ {{- with $.Values.matrixAuthenticationService }}
10
+ {{- if .enabled }}
11
+ {{- $messages = concat $messages (include "element-io.matrix-authentication-service.validations" (dict "root" $ "context" .) | fromJsonArray) }}
12
+ {{- end }}
13
+ {{- end }}
14
+
15
+ {{- with $.Values.matrixRTC }}
16
+ {{- if .enabled }}
17
+ {{- $messages = concat $messages (include "element-io.matrix-rtc.validations" (dict "root" $ "context" .) | fromJsonArray) }}
18
+ {{- end }}
19
+ {{- end }}
20
+
21
+ {{- with $.Values.synapse }}
22
+ {{- if .enabled }}
23
+ {{- $messages = concat $messages (include "element-io.synapse.validations" (dict "root" $ "context" .) | fromJsonArray) }}
24
+ {{- end }}
25
+ {{- end }}
26
+
27
+ {{- with $.Values.wellKnownDelegation }}
28
+ {{- if .enabled }}
29
+ {{- $messages = concat $messages (include "element-io.well-known-delegation.validations" (dict "root" $ "context" .) | fromJsonArray) }}
30
+ {{- end }}
31
+ {{- end }}
32
+
33
+ {{- if gt (len $messages) 0 }}
34
+ {{ fail ($messages | join "\n- " )}}
35
+ {{- end }}
Original file line number Diff line number Diff line change
1
+ Improve validation messages for values that are templated.
You can’t perform that action at this time.
0 commit comments