diff --git a/charts/incubator/blocky/Chart.yaml b/charts/incubator/blocky/Chart.yaml index a44a8da7818..a516f8089f2 100644 --- a/charts/incubator/blocky/Chart.yaml +++ b/charts/incubator/blocky/Chart.yaml @@ -3,7 +3,7 @@ appVersion: "elopment" dependencies: - name: common repository: https://library-charts.truecharts.org - version: 10.5.7 + version: 10.6.0 - condition: redis.enabled name: redis repository: https://charts.truecharts.org @@ -26,7 +26,7 @@ sources: - https://github.com/0xERR0R/blocky - https://github.com/Mozart409/blocky-frontend - https://hub.docker.com/r/spx01/blocky -version: 0.0.3 +version: 0.0.4 annotations: truecharts.org/catagories: | - network diff --git a/charts/incubator/blocky/questions.yaml b/charts/incubator/blocky/questions.yaml index 9ec970e875a..c9c52e0ac04 100644 --- a/charts/incubator/blocky/questions.yaml +++ b/charts/incubator/blocky/questions.yaml @@ -85,6 +85,215 @@ questions: type: string required: true default: "" + - variable: bootstrapDns + group: Container Configuration + label: Bootstrap DNS + schema: + additional_attrs: true + type: dict + attrs: + - variable: upstream + label: Upstream + schema: + type: string + default: "" + - variable: ips + label: IPs + schema: + type: list + default: [] + items: + - variable: ipEntry + label: IP Entry + schema: + type: string + required: true + default: "" + - variable: filtering + group: Container Configuration + label: Filtering + schema: + additional_attrs: true + type: dict + attrs: + - variable: queryTypes + label: Query Types + schema: + type: list + default: [] + items: + - variable: queryTypeEntry + label: Query Type Entry + schema: + type: string + required: true + default: "" + - variable: customDNS + group: Container Configuration + label: Custom DNS + schema: + additional_attrs: true + type: dict + attrs: + - variable: customTTL + label: Custom TTL + schema: + type: string + default: 1h + - variable: filterUnmappedTypes + label: Filter Unmapped Types + schema: + type: boolean + default: true + - variable: rewrite + label: Rewrite + schema: + type: list + default: [] + items: + - variable: rewriteEntry + label: Rewrite Entry + schema: + type: dict + additional_attrs: true + attrs: + - variable: in + label: In + schema: + type: string + required: true + default: "" + - variable: out + label: Out + schema: + type: string + required: true + default: "" + - variable: mapping + label: Mapping + schema: + type: list + default: [] + items: + - variable: mappingEntry + label: Mapping Entry + schema: + type: dict + additional_attrs: true + attrs: + - variable: in + label: In + schema: + type: string + required: true + default: "" + - variable: out + label: Out + schema: + type: string + required: true + default: "" + - variable: clientLookup + group: Container Configuration + label: Client Lookup + schema: + additional_attrs: true + type: dict + attrs: + - variable: upstream + label: Upstream + schema: + type: string + default: "" + - variable: singleNameOrder + label: Single Name Order + schema: + type: list + default: [] + items: + - variable: singleNameEntry + label: Single Name Entry + schema: + type: string + required: true + default: "" + - variable: clients + label: Clients + schema: + type: list + default: [] + items: + - variable: clientEntry + label: Client Entry + schema: + type: dict + additional_attrs: true + attrs: + - variable: domain + label: Domain + schema: + type: string + required: true + default: "" + - variable: ips + label: IPs + schema: + type: list + default: [] + items: + - variable: ipEntry + label: IP Entry + schema: + type: string + required: true + default: "" + - variable: caching + group: Container Configuration + label: Caching + schema: + additional_attrs: true + type: dict + attrs: + - variable: minTime + label: Min Time + schema: + type: string + default: "" + - variable: maxTime + label: Max Time + schema: + type: string + default: "" + - variable: maxItemsCount + label: Max Items Count + schema: + type: int + default: 0 + - variable: prefetching + label: Prefetching + schema: + type: boolean + default: false + - variable: prefetchExpires + label: Prefetch Expires + schema: + type: string + default: 2h + - variable: prefetchThreshold + label: Prefetch Threshold + schema: + type: int + default: 5 + - variable: prefetchMaxItemsCount + label: Prefetch Max Items Count + schema: + type: int + default: 0 + - variable: cacheTimeNegative + label: Cache Time Negative + schema: + type: string + default: 30m - variable: conditional group: Container Configuration label: Conditional @@ -291,6 +500,35 @@ questions: type: string required: true default: "" + - variable: hostsFile + group: Container Configuration + label: Hosts File + schema: + additional_attrs: true + type: dict + attrs: + - variable: enabled + label: Enabled + schema: + type: boolean + default: false + show_subquestions_if: true + subquestions: + - variable: filePath + label: File Path + schema: + type: string + default: /etc/hosts + - variable: hostsTTL + label: Hosts TTL + schema: + type: string + default: 60m + - variable: refreshPeriod + label: Refresh Period + schema: + type: string + default: 30m - variable: k8sgateway group: Container Configuration label: k8s-Gateway Configuration @@ -345,7 +583,6 @@ questions: type: string required: true default: dns01.clouddns.com - - variable: advancedOptions label: Advanced Options schema: diff --git a/charts/incubator/blocky/templates/_blockyConfig.tpl b/charts/incubator/blocky/templates/_blockyConfig.tpl index 1246345de5b..30e78a1acfa 100644 --- a/charts/incubator/blocky/templates/_blockyConfig.tpl +++ b/charts/incubator/blocky/templates/_blockyConfig.tpl @@ -11,7 +11,7 @@ metadata: {{- include "tc.common.labels" . | nindent 4 }} data: tc-config.yaml: | -{{ $config | toYaml | indent 6 }} +{{ $config | toYaml | indent 4 }} {{- end -}} {{- define "blocky.config" -}} @@ -30,6 +30,10 @@ prometheus: upstream: default: {{- .Values.defaultUpstreams | toYaml | nindent 8 }} +{{- range $id, $value := .Values.upstreams }} + {{ $value.name }}: +{{- $value.dnsservers | toYaml | nindent 8 }} +{{- end }} {{- if .Values.certFile }} certFile: {{ .Values.certFile }} @@ -62,18 +66,12 @@ minTlsServeVersion: {{ .Values.minTlsServeVersion }} caching: {{ toYaml .Values.caching | indent 2 }} - {{- if .Values.hostsFile.enabled }} {{ $hostsfile := omit .Values.hostsFile "enabled" }} hostsFile: {{ toYaml $hostsfile | indent 2 }} {{- end }} -{{- range $id, $value := .Values.upstreams }} - {{ $value.name }}: -{{- $value.dnsservers | toYaml | nindent 8 }} -{{- end }} - {{- if or .Values.bootstrapDns.upstream .Values.bootstrapDns.ips }} bootstrapDns: {{- if .Values.bootstrapDns.upstream }} diff --git a/charts/incubator/blocky/templates/_k8sgateway.tpl b/charts/incubator/blocky/templates/_k8sgateway.tpl index 94cccf78438..7735013f760 100644 --- a/charts/incubator/blocky/templates/_k8sgateway.tpl +++ b/charts/incubator/blocky/templates/_k8sgateway.tpl @@ -43,8 +43,8 @@ startupProbe: Create the matchable regex from domain */}} {{- define "k8sgateway.configmap.regex" -}} -{{- if .Values.k8sgateway.domain }} -{{- .Values.k8sgateway.domain | replace "." "[.]" -}} +{{- if .dnsChallenge.domain }} +{{- .dnsChallenge.domain | replace "." "[.]" -}} {{- else -}} {{ "unset" }} {{- end }} @@ -72,9 +72,9 @@ data: ready {{- range .Values.k8sgateway.domains }} {{- if .dnsChallenge.enabled }} - template IN ANY {{ required "Delegated domain ('domain') is mandatory " .domain }} { + 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 " $values.dnsChallenge.domain }}" + answer "{{ "{{" }} .Name {{ "}}" }} 5 IN CNAME {{ "{{" }} index .Match 1 {{ "}}" }}.{{ required "DNS01 challenge domain is mandatory" .dnsChallenge.domain }}" fallthrough } {{- end }}