Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Commit b538f23

Browse files
authored
[helm] Update Ingress hosts to account for IPv6 (server+client) and scheme (client) (#3182)
This updates the matchers for deriving the host values from the dendrite config. The original version turned out to have 2 complications: - It did not support IPv6 addresses as host value - It failed for `well_known_client_host` which is a (base) URL instead of a hostname+port. I've verified `well_known_server_name` with ``` dendrite.example.net:443 dendrite.example.net 192.168.1.1 192.168.1.1:1324 [dead::beef]:1234 [dead::beef] [ffff:dead::beef] ``` and `well_known_client_name` with: ``` https://dendrite.example.net:443 https://dendrite.example.net https://dendrite.example.net/ http://dendrite.example.net:8080/ http://192.168.1.1 http://192.168.1.1:8080/ http://[dead::beef]:1234 http://[dead::beef]/ http://[ffff:dead::beef] ``` Fixes #3175 ### Pull Request Checklist <!-- Please read https://matrix-org.github.io/dendrite/development/contributing before submitting your pull request --> * [x] I have added Go unit tests or [Complement integration tests](https://github.com/matrix-org/complement) for this PR _or_ I have justified why this PR doesn't need tests * [x] Pull request includes a [sign off below using a legally identifiable name](https://matrix-org.github.io/dendrite/development/contributing#sign-off) _or_ I have already signed off privately Signed-off-by: `Omar Pakker <Omar007@users.noreply.github.com>` --------- Signed-off-by: Omar Pakker <Omar007@users.noreply.github.com> [skip CI]
1 parent e3a7039 commit b538f23

4 files changed

Lines changed: 4 additions & 21 deletions

File tree

helm/dendrite/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: dendrite
3-
version: "0.13.2"
3+
version: "0.13.3"
44
appVersion: "0.13.2"
55
description: Dendrite Matrix Homeserver
66
type: application

helm/dendrite/templates/deployment.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ spec:
2626
annotations:
2727
confighash: secret-{{ .Values.dendrite_config | toYaml | sha256sum | trunc 32 }}
2828
spec:
29-
strategy:
30-
type: {{ $.Values.strategy.type }}
31-
{{- if eq $.Values.strategy.type "RollingUpdate" }}
32-
rollingUpdate:
33-
maxSurge: {{ $.Values.strategy.rollingUpdate.maxSurge }}
34-
maxUnavailable: {{ $.Values.strategy.rollingUpdate.maxUnavailable }}
35-
{{- end }}
3629
volumes:
3730
- name: {{ include "dendrite.fullname" . }}-conf-vol
3831
secret:
@@ -116,4 +109,4 @@ spec:
116109
failureThreshold: 10
117110
httpGet:
118111
path: /_dendrite/monitor/up
119-
port: http
112+
port: http

helm/dendrite/templates/ingress.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{{- if .Values.ingress.enabled -}}
22
{{- $fullName := include "dendrite.fullname" . -}}
33
{{- $serverNameHost := .Values.dendrite_config.global.server_name -}}
4-
{{- $wellKnownServerHost := default $serverNameHost (regexFind "^[^:]+" .Values.dendrite_config.global.well_known_server_name) -}}
5-
{{- $wellKnownClientHost := default $serverNameHost (regexFind "^[^:]+" .Values.dendrite_config.global.well_known_client_name) -}}
4+
{{- $wellKnownServerHost := default $serverNameHost (regexFind "^(\\[.+\\])?[^:]*" .Values.dendrite_config.global.well_known_server_name) -}}
5+
{{- $wellKnownClientHost := default $serverNameHost (regexFind "//(\\[.+\\])?[^:/]*" .Values.dendrite_config.global.well_known_client_name | trimAll "/") -}}
66
{{- $allHosts := list $serverNameHost $wellKnownServerHost $wellKnownClientHost | uniq -}}
77
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
88
apiVersion: networking.k8s.io/v1

helm/dendrite/values.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,6 @@ extraVolumeMounts: []
6565
# - mountPath: /etc/dendrite/extra-config
6666
# name: extra-config
6767

68-
strategy:
69-
# -- Strategy to use for rolling updates (e.g. Recreate, RollingUpdate)
70-
# If you are using ReadWriteOnce volumes, you should probably use Recreate
71-
type: RollingUpdate
72-
rollingUpdate:
73-
# -- Maximum number of pods that can be unavailable during the update process
74-
maxUnavailable: 25%
75-
# -- Maximum number of pods that can be scheduled above the desired number of pods
76-
maxSurge: 25%
77-
7868
strategy:
7969
# -- Strategy to use for rolling updates (e.g. Recreate, RollingUpdate)
8070
# If you are using ReadWriteOnce volumes, you should probably use Recreate

0 commit comments

Comments
 (0)