fix(blocky): Finish up UI (#3866)
* fix(blocky): switch from subpath to items * whoops * don't run upgrade * fix identation * no message * see content * also see content * agin * -.- * run * run as is for now * revert few things * fix upstreams * go again * fix configmap of k8s-gateway * bump common * back to subPath * add boostrapDns * add filtering * add custom dns * add client lookup * add caching * add hostsFile * add k8s forward * add unbound * apply suggestions from code review
This commit is contained in:
@@ -3,7 +3,7 @@ appVersion: "elopment"
|
|||||||
dependencies:
|
dependencies:
|
||||||
- name: common
|
- name: common
|
||||||
repository: https://library-charts.truecharts.org
|
repository: https://library-charts.truecharts.org
|
||||||
version: 10.5.7
|
version: 10.6.0
|
||||||
- condition: redis.enabled
|
- condition: redis.enabled
|
||||||
name: redis
|
name: redis
|
||||||
repository: https://charts.truecharts.org
|
repository: https://charts.truecharts.org
|
||||||
@@ -26,7 +26,7 @@ sources:
|
|||||||
- https://github.com/0xERR0R/blocky
|
- https://github.com/0xERR0R/blocky
|
||||||
- https://github.com/Mozart409/blocky-frontend
|
- https://github.com/Mozart409/blocky-frontend
|
||||||
- https://hub.docker.com/r/spx01/blocky
|
- https://hub.docker.com/r/spx01/blocky
|
||||||
version: 0.0.3
|
version: 0.0.4
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- network
|
- network
|
||||||
|
|||||||
@@ -85,6 +85,215 @@ questions:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
default: ""
|
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
|
- variable: conditional
|
||||||
group: Container Configuration
|
group: Container Configuration
|
||||||
label: Conditional
|
label: Conditional
|
||||||
@@ -291,6 +500,35 @@ questions:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
default: ""
|
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
|
- variable: k8sgateway
|
||||||
group: Container Configuration
|
group: Container Configuration
|
||||||
label: k8s-Gateway Configuration
|
label: k8s-Gateway Configuration
|
||||||
@@ -345,7 +583,6 @@ questions:
|
|||||||
type: string
|
type: string
|
||||||
required: true
|
required: true
|
||||||
default: dns01.clouddns.com
|
default: dns01.clouddns.com
|
||||||
|
|
||||||
- variable: advancedOptions
|
- variable: advancedOptions
|
||||||
label: Advanced Options
|
label: Advanced Options
|
||||||
schema:
|
schema:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ metadata:
|
|||||||
{{- include "tc.common.labels" . | nindent 4 }}
|
{{- include "tc.common.labels" . | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
tc-config.yaml: |
|
tc-config.yaml: |
|
||||||
{{ $config | toYaml | indent 6 }}
|
{{ $config | toYaml | indent 4 }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- define "blocky.config" -}}
|
{{- define "blocky.config" -}}
|
||||||
@@ -30,6 +30,10 @@ prometheus:
|
|||||||
upstream:
|
upstream:
|
||||||
default:
|
default:
|
||||||
{{- .Values.defaultUpstreams | toYaml | nindent 8 }}
|
{{- .Values.defaultUpstreams | toYaml | nindent 8 }}
|
||||||
|
{{- range $id, $value := .Values.upstreams }}
|
||||||
|
{{ $value.name }}:
|
||||||
|
{{- $value.dnsservers | toYaml | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.certFile }}
|
{{- if .Values.certFile }}
|
||||||
certFile: {{ .Values.certFile }}
|
certFile: {{ .Values.certFile }}
|
||||||
@@ -62,18 +66,12 @@ minTlsServeVersion: {{ .Values.minTlsServeVersion }}
|
|||||||
caching:
|
caching:
|
||||||
{{ toYaml .Values.caching | indent 2 }}
|
{{ toYaml .Values.caching | indent 2 }}
|
||||||
|
|
||||||
|
|
||||||
{{- if .Values.hostsFile.enabled }}
|
{{- if .Values.hostsFile.enabled }}
|
||||||
{{ $hostsfile := omit .Values.hostsFile "enabled" }}
|
{{ $hostsfile := omit .Values.hostsFile "enabled" }}
|
||||||
hostsFile:
|
hostsFile:
|
||||||
{{ toYaml $hostsfile | indent 2 }}
|
{{ toYaml $hostsfile | indent 2 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- range $id, $value := .Values.upstreams }}
|
|
||||||
{{ $value.name }}:
|
|
||||||
{{- $value.dnsservers | toYaml | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if or .Values.bootstrapDns.upstream .Values.bootstrapDns.ips }}
|
{{- if or .Values.bootstrapDns.upstream .Values.bootstrapDns.ips }}
|
||||||
bootstrapDns:
|
bootstrapDns:
|
||||||
{{- if .Values.bootstrapDns.upstream }}
|
{{- if .Values.bootstrapDns.upstream }}
|
||||||
|
|||||||
@@ -43,8 +43,8 @@ startupProbe:
|
|||||||
Create the matchable regex from domain
|
Create the matchable regex from domain
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "k8sgateway.configmap.regex" -}}
|
{{- define "k8sgateway.configmap.regex" -}}
|
||||||
{{- if .Values.k8sgateway.domain }}
|
{{- if .dnsChallenge.domain }}
|
||||||
{{- .Values.k8sgateway.domain | replace "." "[.]" -}}
|
{{- .dnsChallenge.domain | replace "." "[.]" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{ "unset" }}
|
{{ "unset" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -72,9 +72,9 @@ data:
|
|||||||
ready
|
ready
|
||||||
{{- range .Values.k8sgateway.domains }}
|
{{- range .Values.k8sgateway.domains }}
|
||||||
{{- if .dnsChallenge.enabled }}
|
{{- 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" . }}"
|
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
|
fallthrough
|
||||||
}
|
}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user