diff --git a/charts/blocky/Chart.yaml b/charts/blocky/Chart.yaml index f22f6d07..e3789970 100644 --- a/charts/blocky/Chart.yaml +++ b/charts/blocky/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "v0.5" description: DNS proxy as ad-blocker for local network name: blocky -version: 2.1.0 +version: 2.2.0 keywords: - blocky - dbs diff --git a/charts/blocky/templates/configmap.yaml b/charts/blocky/templates/configmap.yaml index c4df7086..ee6cae8e 100644 --- a/charts/blocky/templates/configmap.yaml +++ b/charts/blocky/templates/configmap.yaml @@ -9,5 +9,8 @@ metadata: app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} data: +{{- if .Values.config }} +{{ $root := . }} config.yml: | -{{ .Values.config | indent 4 }} +{{ tpl (toYaml .Values.config | indent 4) $root }} +{{- end }} diff --git a/charts/blocky/templates/deployment.yaml b/charts/blocky/templates/deployment.yaml index fdacf99d..a3cf349d 100644 --- a/charts/blocky/templates/deployment.yaml +++ b/charts/blocky/templates/deployment.yaml @@ -37,8 +37,6 @@ spec: - name: config mountPath: /app/config.yml subPath: config.yml - - name: logs - mountPath: /logs ports: ports: - name: monitoring @@ -74,9 +72,6 @@ spec: - name: config configMap: name: {{ template "blocky.fullname" . }} - - name: logs - emptyDir: - medium: Memory {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/blocky/values.yaml b/charts/blocky/values.yaml index fc48ca40..ccc4743f 100644 --- a/charts/blocky/values.yaml +++ b/charts/blocky/values.yaml @@ -12,87 +12,87 @@ replicas: 1 timeZone: "UTC" -# blocky configuration -config: | +# blocky configuration - will translate to config.yml file inside the pod +config: upstream: - # these external DNS resolvers will be used. Blocky picks 2 random resolvers from the list for each query - # format for resolver: net:host:[port][/path]. net could be tcp, udp, tcp-tls or https (DoH). If port is empty, default port will be used (53 for udp and tcp, 853 for tcp-tls, 443 for https (Doh)) - externalResolvers: - - udp:8.8.8.8 - - udp:8.8.4.4 - - udp:1.1.1.1 - - tcp-tls:1.0.0.1:853 - - https://cloudflare-dns.com/dns-query + # these external DNS resolvers will be used. Blocky picks 2 random resolvers from the list for each query + # format for resolver: net:host:[port][/path]. net could be tcp, udp, tcp-tls or https (DoH). If port is empty, default port will be used (53 for udp and tcp, 853 for tcp-tls, 443 for https (Doh)) + externalResolvers: + - udp:8.8.8.8 + - udp:8.8.4.4 + - udp:1.1.1.1 + - tcp-tls:1.0.0.1:853 + - https://cloudflare-dns.com/dns-query # optional: custom IP address for domain name (with all sub-domains) # example: query "printer.lan" or "my.printer.lan" will return 192.168.178.3 customDNS: - mapping: - printer.lan: 192.168.178.3 + mapping: + printer.lan: 192.168.178.3 # optional: definition, which DNS resolver should be used for queries to the domain (with all sub-domains). # Example: Query client.fritz.box will ask DNS server 192.168.178.1. This is necessary for local network, to resolve clients by host name conditional: - mapping: - fritz.box: udp:192.168.178.1 + mapping: + fritz.box: udp:192.168.178.1 # optional: use black and white lists to block queries (for example ads, trackers, adult pages etc.) blocking: - # definition of blacklist groups. Can be external link (http/https) or local file - blackLists: - ads: - - https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt - - https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts - - https://mirror1.malwaredomains.com/files/justdomains - - http://sysctl.org/cameleon/hosts - - https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist - - https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt - special: - - https://hosts-file.net/ad_servers.txt - # definition of whitelist groups. Attention: if the same group has black and whitelists, whitelists will be used to disable particular blacklist entries. If a group has only whitelist entries -> this means only domains from this list are allowed, all other domains will be blocked - whiteLists: - ads: - - whitelist.txt - # definition: which groups should be applied for which client - clientGroupsBlock: - # default will be used, if no special definition for a client name exists - default: - - ads - - special - # use client name or ip address - laptop.fritz.box: - - ads - # which response will be sent, if query is blocked: - # zeroIp: 0.0.0.0 will be returned (default) - # nxDomain: return NXDOMAIN as return code - blockType: zeroIp - # optional: automatically list refresh period in minutes. Default: 4h. - # Negative value -> deactivate automatically refresh. - # 0 value -> use default - refreshPeriod: 1 + # definition of blacklist groups. Can be external link (http/https) or local file + blackLists: + ads: + - https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt + - https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts + - https://mirror1.malwaredomains.com/files/justdomains + - http://sysctl.org/cameleon/hosts + - https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist + - https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt + special: + - https://hosts-file.net/ad_servers.txt + # definition of whitelist groups. Attention: if the same group has black and whitelists, whitelists will be used to disable particular blacklist entries. If a group has only whitelist entries -> this means only domains from this list are allowed, all other domains will be blocked + whiteLists: + ads: + - whitelist.txt + # definition: which groups should be applied for which client + clientGroupsBlock: + # default will be used, if no special definition for a client name exists + default: + - ads + - special + # use client name or ip address + laptop.fritz.box: + - ads + # which response will be sent, if query is blocked: + # zeroIp: 0.0.0.0 will be returned (default) + # nxDomain: return NXDOMAIN as return code + blockType: zeroIp + # optional: automatically list refresh period in minutes. Default: 4h. + # Negative value -> deactivate automatically refresh. + # 0 value -> use default + # refreshPeriod: 1 # optional: configuration for caching of DNS responses - caching: + # caching: # amount in minutes, how long a response must be cached (min value). # If <=0, use response's TTL, if >0 use this value, if TTL is smaller # Default: 0 - minTime: 40 + # minTime: 40 # amount in minutes, how long a response must be cached (max value). # If <0, do not cache responses # If 0, use TTL # If > 0, use this value, if TTL is greater # Default: 0 - maxTime: -1 + # maxTime: -1 # optional: configuration of client name resolution clientLookup: - # this DNS resolver will be used to perform reverse DNS lookup (typically local router) - upstream: udp:192.168.178.1 - # optional: some routers return multiple names for client (host name and user defined name). Define which single name should be used. - # Example: take second name if present, if not take first name - singleNameOrder: - - 2 - - 1 + # this DNS resolver will be used to perform reverse DNS lookup (typically local router) + upstream: udp:192.168.178.1 + # optional: some routers return multiple names for client (host name and user defined name). Define which single name should be used. + # Example: take second name if present, if not take first name + # singleNameOrder: + # - 2 + # - 1 # optional: configuration for prometheus metrics endpoint prometheus: # enabled if true @@ -102,15 +102,6 @@ config: | # url path, optional (default '/metrics') path: /metrics - # optional: write query information (question, answer, client, duration etc) to daily csv file - queryLog: - # directory (should be mounted as volume in docker) - dir: /logs - # if true, write one file per client. Writes all queries to single file otherwise - perClient: true - # if > 0, deletes log files which are older than ... days - logRetentionDays: 7 - # optional: DNS listener port, default 53 (UDP and TCP) port: 53 # optional: HTTP listener port, default 0 = no http listener. If > 0, will be used for prometheus metrics, pprof, ... @@ -167,11 +158,10 @@ resources: {} # resources, such as Minikube. If you do want to specify resources, uncomment the following # lines, adjust them as necessary, and remove the curly braces after 'resources:'. # limits: - # cpu: 100m - # memory: 128Mi + # memory: 500Mi # requests: - # cpu: 100m - # memory: 128Mi + # cpu: 50m + # memory: 275Mi nodeSelector: {}