Skip to content

Commit 2961946

Browse files
authored
Fix *.ingress.tls templating (#10)
* fix tls templating to allow for less complexity * fix ingress.tls to be rendered automatically
1 parent 3a544a3 commit 2961946

File tree

6 files changed

+26
-48
lines changed

6 files changed

+26
-48
lines changed

charts/matrix/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sources:
88

99
type: application
1010

11-
version: 4.0.2
11+
version: 4.0.3
1212
appVersion: v1.88.0
1313

1414
maintainers:

charts/matrix/README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# matrix
22

3-
![Version: 4.0.2](https://img.shields.io/badge/Version-4.0.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.88.0](https://img.shields.io/badge/AppVersion-v1.88.0-informational?style=flat-square)
3+
![Version: 4.0.3](https://img.shields.io/badge/Version-4.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.88.0](https://img.shields.io/badge/AppVersion-v1.88.0-informational?style=flat-square)
44

55
A Helm chart to deploy a Matrix homeserver stack into Kubernetes
66

@@ -117,9 +117,8 @@ A Helm chart to deploy a Matrix homeserver stack into Kubernetes
117117
| element.ingress.annotations."cert-manager.io/cluster-issuer" | string | `"letsencrypt-staging"` | required for TLS certs issued by cert-manager |
118118
| element.ingress.annotations."nginx.ingress.kubernetes.io/configuration-snippet" | string | `"proxy_intercept_errors off;\n"` | |
119119
| element.ingress.enabled | bool | `true` | enable ingress for element |
120-
| element.ingress.hosts | string | `"element.chart-example.local"` | the hostname to use for element |
121-
| element.ingress.tls[0].hosts | list | `["element.chart-example.local"]` | the hostname to use for element if using TLS certs |
122-
| element.ingress.tls[0].secretName | string | `"element-tls"` | |
120+
| element.ingress.host | string | `"element.chart-example.local"` | the hostname to use for element |
121+
| element.ingress.tls.enabled | bool | `true` | |
123122
| element.integrations.api | string | `"https://scalar.vector.im/api"` | API for the integration server |
124123
| element.integrations.enabled | bool | `true` | enables the Integrations menu, including: widgets, bots, and other plugins to Element |
125124
| element.integrations.ui | string | `"https://scalar.vector.im/"` | UI to load when a user selects the Integrations button at the top-right of a room |
@@ -170,8 +169,7 @@ A Helm chart to deploy a Matrix homeserver stack into Kubernetes
170169
| matrix.federation.ingress.annotations."nginx.ingress.kubernetes.io/configuration-snippet" | string | `"proxy_intercept_errors off;\n"` | required for the Nginx ingress provider. You can remove it if you use a different ingress provider |
171170
| matrix.federation.ingress.enabled | bool | `true` | |
172171
| matrix.federation.ingress.host | string | `"matrix-fed.chart-example.local"` | |
173-
| matrix.federation.ingress.tls[0].hosts[0] | string | `"matrix-fed.chart-example.local"` | |
174-
| matrix.federation.ingress.tls[0].secretName | string | `"federation-tls"` | |
172+
| matrix.federation.ingress.tls.enabled | bool | `true` | |
175173
| matrix.federation.whitelist | list | `[]` | Allow list of domains to federate with (comment for all domains except blacklisted) |
176174
| matrix.homeserverExtra | object | `{}` | Contents will be appended to the end of the default configuration |
177175
| matrix.homeserverOverride | object | `{}` | Replace homeserver.yaml will be replaced with these contents |
@@ -235,8 +233,7 @@ A Helm chart to deploy a Matrix homeserver stack into Kubernetes
235233
| synapse.ingress.annotations."nginx.ingress.kubernetes.io/configuration-snippet" | string | `"proxy_intercept_errors off;\n"` | This annotation is required for the Nginx ingress provider. You can remove it if you use a different ingress provider |
236234
| synapse.ingress.enabled | bool | `true` | |
237235
| synapse.ingress.host | string | `"matrix.chart-example.local"` | |
238-
| synapse.ingress.tls[0].hosts[0] | string | `"matrix.chart-example.local"` | |
239-
| synapse.ingress.tls[0].secretName | string | `"matrix-tls"` | |
236+
| synapse.ingress.tls.enabled | bool | `true` | |
240237
| synapse.labels | object | `{"component":"synapse"}` | Labels to be appended to all Synapse resources |
241238
| synapse.metrics.annotations | bool | `true` | |
242239
| synapse.metrics.enabled | bool | `true` | Whether Synapse should capture metrics on an additional endpoint |

charts/matrix/templates/element/ingress.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,21 @@ metadata:
1010
{{- toYaml . | nindent 4 }}
1111
{{- end }}
1212
spec:
13-
{{- if .Values.element.ingress.tls }}
13+
{{- if .Values.element.ingress.tls.enabled }}
1414
tls:
15-
{{- range .Values.element.ingress.tls }}
1615
- hosts:
17-
{{- range .hosts }}
18-
- {{ . | quote }}
19-
{{- end }}
20-
secretName: {{ .secretName }}
21-
{{- end }}
16+
- {{ .Values.element.ingress.host }}
17+
secretName: element-tls
2218
{{- end }}
2319
rules:
2420
- host: {{ .Values.element.ingress.host }}
2521
http:
2622
paths:
2723
- path: "/"
24+
pathType: ImplementationSpecific
2825
backend:
2926
service:
3027
name: "{{ include "matrix.fullname" . }}-element"
3128
port:
3229
number: {{ .Values.element.service.port }}
33-
pathType: ImplementationSpecific
3430
{{- end }}

charts/matrix/templates/synapse/synapse-federation-ingress.yaml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,21 @@ metadata:
1010
{{- toYaml . | nindent 4 }}
1111
{{- end }}
1212
spec:
13-
{{- if .Values.matrix.federation.ingress.tls }}
13+
{{- if .Values.matrix.federation.ingress.tls.enabled }}
1414
tls:
15-
{{- range .Values.matrix.federation.ingress.tls }}
1615
- hosts:
17-
{{- range .hosts }}
18-
- {{ . | quote }}
19-
{{- end }}
20-
secretName: {{ .secretName }}
21-
{{- end }}
16+
- {{ .Values.matrix.federation.ingress.host }}
17+
secretName: matrix-federation-tls
2218
{{- end }}
2319
rules:
2420
- host: {{ .Values.matrix.federation.ingress.host }}
2521
http:
2622
paths:
2723
- path: "/"
24+
pathType: ImplementationSpecific
2825
backend:
2926
service:
3027
name: "{{ include "matrix.fullname" . }}-synapse-federation"
3128
port:
3229
number: {{ .Values.synapse.service.federation.port }}
33-
pathType: ImplementationSpecific
3430
{{- end }}
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.synapse.ingress.enabled -}}
1+
{{- if .Values.synapse.ingress.enabled }}
22
apiVersion: networking.k8s.io/v1
33
kind: Ingress
44
metadata:
@@ -10,25 +10,21 @@ metadata:
1010
{{- toYaml . | nindent 4 }}
1111
{{- end }}
1212
spec:
13-
{{- if .Values.synapse.ingress.tls }}
14-
tls:
15-
{{- range .Values.synapse.ingress.tls }}
16-
- hosts:
17-
{{- range .hosts }}
18-
- {{ . | quote }}
19-
{{- end }}
20-
secretName: {{ .secretName }}
21-
{{- end }}
22-
{{- end }}
2313
rules:
2414
- host: {{ .Values.synapse.ingress.host }}
2515
http:
2616
paths:
2717
- path: "/"
18+
pathType: ImplementationSpecific
2819
backend:
2920
service:
3021
name: "{{ include "matrix.fullname" . }}-synapse"
3122
port:
3223
number: {{ .Values.synapse.service.port }}
33-
pathType: ImplementationSpecific
24+
{{- if .Values.synapse.ingress.tls.enabled }}
25+
tls:
26+
- secretName: matrix-tls
27+
hosts:
28+
- {{ .Values.synapse.ingress.host }}
29+
{{- end }}
3430
{{- end }}

charts/matrix/values.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ matrix:
7777
ingress:
7878
enabled: true
7979
tls:
80-
- secretName: federation-tls
81-
hosts:
82-
- matrix-fed.chart-example.local
80+
enabled: true
8381
host: matrix-fed.chart-example.local
8482
annotations:
8583
# -- required for the Nginx ingress provider. You can remove it if you
@@ -347,9 +345,7 @@ synapse:
347345
enabled: true
348346
host: matrix.chart-example.local
349347
tls:
350-
- secretName: matrix-tls
351-
hosts:
352-
- matrix.chart-example.local
348+
enabled: true
353349
annotations:
354350
# -- This annotation is required for the Nginx ingress provider. You can
355351
# remove it if you use a different ingress provider
@@ -422,12 +418,9 @@ element:
422418
# -- enable ingress for element
423419
enabled: true
424420
tls:
425-
- secretName: element-tls
426-
# -- the hostname to use for element if using TLS certs
427-
hosts:
428-
- element.chart-example.local
421+
enabled: true
429422
# -- the hostname to use for element
430-
hosts: element.chart-example.local
423+
host: element.chart-example.local
431424
annotations:
432425
# This annotation is required for the Nginx ingress provider. You can
433426
# remove it if you use a different ingress provider

0 commit comments

Comments
 (0)