diff --git a/charts/matrix-stack/source/common/ingress_global.json b/charts/matrix-stack/source/common/ingress_global.json new file mode 100644 index 000000000..7bc999df6 --- /dev/null +++ b/charts/matrix-stack/source/common/ingress_global.json @@ -0,0 +1,42 @@ +{ + "type": "object", + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "className": { + "type": "string" + }, + "tlsEnabled": { + "type": "boolean" + }, + "tlsSecret": { + "type": "string" + }, + "controllerType": { + "type": "string", + "enum": [ + "ingress-nginx" + ] + }, + "service": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "ClusterIP", + "NodePort", + "LoadBalancer" + ] + } + } + } + } +} diff --git a/charts/matrix-stack/source/common/ingress_without_host.json b/charts/matrix-stack/source/common/ingress_without_host.json index 7bc999df6..24e274ad4 100644 --- a/charts/matrix-stack/source/common/ingress_without_host.json +++ b/charts/matrix-stack/source/common/ingress_without_host.json @@ -4,7 +4,10 @@ "annotations": { "type": "object", "additionalProperties": { - "type": "string" + "type": [ + "string", + "null" + ] } }, "className": { @@ -24,9 +27,6 @@ }, "service": { "type": "object", - "required": [ - "type" - ], "properties": { "type": { "type": "string", diff --git a/charts/matrix-stack/source/values.schema.json b/charts/matrix-stack/source/values.schema.json index d50248b08..1e49149c8 100644 --- a/charts/matrix-stack/source/values.schema.json +++ b/charts/matrix-stack/source/values.schema.json @@ -43,7 +43,7 @@ } }, "ingress": { - "$ref": "file://common/ingress_without_host.json" + "$ref": "file://common/ingress_global.json" }, "tolerations": { "$ref": "file://common/tolerations.json" diff --git a/charts/matrix-stack/source/wellKnownDelegation.json b/charts/matrix-stack/source/wellKnownDelegation.json index 1c73fc64b..11c8cad0d 100644 --- a/charts/matrix-stack/source/wellKnownDelegation.json +++ b/charts/matrix-stack/source/wellKnownDelegation.json @@ -7,7 +7,7 @@ "type": "boolean" }, "ingress": { - "$ref": "file://common/ingress.json" + "$ref": "file://common/ingress_without_host.json" }, "labels": { "$ref": "file://common/labels.json" diff --git a/charts/matrix-stack/templates/well-known/ingress.yaml b/charts/matrix-stack/templates/well-known/ingress.yaml index 9db9ccd41..4cab4bcfb 100644 --- a/charts/matrix-stack/templates/well-known/ingress.yaml +++ b/charts/matrix-stack/templates/well-known/ingress.yaml @@ -1,5 +1,5 @@ {{- /* -Copyright 2024 New Vector Ltd +Copyright 2024-2025 New Vector Ltd SPDX-License-Identifier: AGPL-3.0-only */ -}} @@ -15,10 +15,10 @@ metadata: name: {{ $.Release.Name }}-well-known namespace: {{ $.Release.Namespace }} spec: -{{- include "element-io.ess-library.ingress.tls" (dict "root" $ "context" (dict "host" (.ingress.host | default $.Values.serverName) "ingress" .ingress "ingressName" "well-known")) | nindent 2 }} +{{- include "element-io.ess-library.ingress.tls" (dict "root" $ "context" (dict "host" $.Values.serverName "ingress" .ingress "ingressName" "well-known")) | nindent 2 }} {{- include "element-io.ess-library.ingress.className" (dict "root" $ "context" .ingress.className) | nindent 2 }} rules: - - host: "{{ tpl ($.Values.wellKnownDelegation.ingress.host | default $.Values.serverName) $ }}" + - host: "{{ tpl $.Values.serverName $ }}" http: paths: {{- if and .baseDomainRedirect.enabled (or $.Values.elementWeb.enabled .baseDomainRedirect.url) }} diff --git a/charts/matrix-stack/values.schema.json b/charts/matrix-stack/values.schema.json index db9d0c434..fc8207f25 100644 --- a/charts/matrix-stack/values.schema.json +++ b/charts/matrix-stack/values.schema.json @@ -10243,9 +10243,6 @@ ] } }, - "host": { - "type": "string" - }, "className": { "type": "string" }, diff --git a/newsfragments/467.changed.md b/newsfragments/467.changed.md new file mode 100644 index 000000000..2a942c3ed --- /dev/null +++ b/newsfragments/467.changed.md @@ -0,0 +1 @@ +Remove wellKnownDelegation.ingress.host from values.yaml as serverName is used for the well-known Ingress.