diff --git a/charts/enterprise/blocky/Chart.yaml b/charts/enterprise/blocky/Chart.yaml index 483764fc41a..4e6cea7320c 100644 --- a/charts/enterprise/blocky/Chart.yaml +++ b/charts/enterprise/blocky/Chart.yaml @@ -25,7 +25,7 @@ sources: - https://0xerr0r.github.io/blocky/ - https://github.com/0xERR0R/blocky - https://github.com/Mozart409/blocky-frontend -version: 5.0.36 +version: 5.0.37 annotations: truecharts.org/catagories: | - network diff --git a/charts/enterprise/blocky/templates/_k8sgateway.tpl b/charts/enterprise/blocky/templates/_k8sgateway.tpl index 37bf5833e14..463923f85da 100644 --- a/charts/enterprise/blocky/templates/_k8sgateway.tpl +++ b/charts/enterprise/blocky/templates/_k8sgateway.tpl @@ -38,7 +38,7 @@ Create the matchable regex from domain {{- $fqdn := ( include "tc.v1.common.lib.chart.names.fqdn" . ) }} enabled: true data: - Corefile: |- + Corefile: | .:{{ .Values.service.k8sgateway.ports.k8sgateway.targetPort }} { errors log @@ -48,9 +48,15 @@ data: ready {{- range .Values.k8sgateway.domains }} {{- if .dnsChallenge.enabled }} + {{- if not .dnsChallenge.domain -}} + {{- fail "DNS01 challenge domain is mandatory" -}} + {{- end }} + template IN ANY {{ required "Delegated domain ('domain') is mandatory" .domain }} { match "_acme-challenge[.](.*)[.]{{ include "k8sgateway.configmap.regex" . }}" - answer "{{ "{{" }} .Name {{ "}}" }} 5 IN CNAME {{ "{{" }} index .Match 1 {{ "}}" }}.{{ required "DNS01 challenge domain is mandatory" .dnsChallenge.domain }}" + {{- $name := "{{ \"{{ .Name }}\" }}" }} + {{- $index := "{{ \"{{ index .Match 1 }}\" }}" }} + answer "{{ $name }} 5 IN CNAME {{ $index }}.{{ .dnsChallenge.domain }}" fallthrough } {{- end }} diff --git a/charts/enterprise/blocky/templates/common.yaml b/charts/enterprise/blocky/templates/common.yaml index 40bf6d293a4..310ef64af8f 100644 --- a/charts/enterprise/blocky/templates/common.yaml +++ b/charts/enterprise/blocky/templates/common.yaml @@ -4,7 +4,6 @@ {{- end }} {{- include "tc.v1.common.loader.init" . }} - {{/* Render configmap for blocky */}} {{- $configmapFile := include "blocky.configmap" . | fromYaml -}} {{- if $configmapFile -}}