Skip to content

Commit

Permalink
Add support for dns.hosts plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Trangoni <[email protected]>
  • Loading branch information
mjtrangoni committed Nov 29, 2023
1 parent ff7850f commit cd385f7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/node-local-dns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: v2
name: node-local-dns
version: 1.4.0-rc.2
version: 1.4.0-rc.3
appVersion: 1.22.24
home: https://github.com/lablabs/k8s-nodelocaldns-helm
description: NodeLocal DNS Cache helm chart
Expand Down
19 changes: 19 additions & 0 deletions charts/node-local-dns/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ data:
{{- if $v.plugins.reload }}
reload
{{- end }}
{{- if $v.plugins.hosts }}
hosts {
{{- range $kk, $vv := $v.plugins.hosts.entries }}
{{ $vv.ip }} {{ $vv.name }}
{{- end }}
{{- if $v.plugins.hosts.ttl }}
ttl {{ $v.plugins.hosts.ttl }}
{{- end }}
{{- if $v.plugins.hosts.no_reverse }}
no_reverse
{{- end }}
{{- if $v.plugins.hosts.reload }}
reload {{ $v.plugins.hosts.reload | quote }}
{{- end }}
{{- if $v.plugins.hosts.fallthrough }}
fallthrough
{{- end }}
}
{{- end }}
{{- if $v.plugins.log }}
log . {{ default "combined" $v.plugins.log.format }} {
class {{ $v.plugins.log.classes }}
Expand Down
8 changes: 8 additions & 0 deletions charts/node-local-dns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ config:
prometheus: true
health:
port: 8080
# hosts:
# entries: # dns.hosts INLINE
# - ip: 10.5.0.4
# name: blabla.lala
# ttl: 3600 # in seconds, 3600 (default)
# no_reverse: true # set no_reverse
# reload: "0s" # 0s disable (default), use duration notation, ie, "1.5h"
# fallthrough: true
ip6.arpa:53:
plugins:
errors: true
Expand Down

0 comments on commit cd385f7

Please sign in to comment.