Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable/node-local-dns] add prefetch options to configuration #586

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/node-local-dns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: node-local-dns
version: 2.0.11
version: 2.0.12
appVersion: 1.23.1
maintainers:
- name: gabrieladt
Expand Down
6 changes: 5 additions & 1 deletion stable/node-local-dns/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# node-local-dns

![Version: 2.0.11](https://img.shields.io/badge/Version-2.0.11-informational?style=flat-square) ![AppVersion: 1.23.1](https://img.shields.io/badge/AppVersion-1.23.1-informational?style=flat-square)
![Version: 2.0.12](https://img.shields.io/badge/Version-2.0.12-informational?style=flat-square) ![AppVersion: 1.23.1](https://img.shields.io/badge/AppVersion-1.23.1-informational?style=flat-square)

A chart to install node-local-dns.

Expand Down Expand Up @@ -57,6 +57,10 @@ helm install my-release deliveryhero/node-local-dns -f values.yaml
| config.dnsServer | string | `"172.20.0.10"` | |
| config.healthPort | int | `8080` | |
| config.localDns | string | `"169.254.20.25"` | |
| config.prefetch.amount | int | `3` | |
| config.prefetch.duration | string | `"30s"` | |
| config.prefetch.enabled | bool | `false` | |
| config.prefetch.percentage | string | `"20%"` | |
| config.setupInterface | bool | `true` | |
| config.setupIptables | bool | `true` | |
| config.skipTeardown | bool | `false` | |
Expand Down
21 changes: 21 additions & 0 deletions stable/node-local-dns/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ data:
cache {
success 9984 30
denial 9984 5
{{- if .Values.config.prefetch.enabled}}
prefetch {{ .Values.config.prefetch.amount }} {{ .Values.config.prefetch.duration }} {{ .Values.config.prefetch.percentage }}
{{- end }}
}
reload
loop
Expand All @@ -32,7 +35,13 @@ data:
}
in-addr.arpa:53 {
errors
{{- if .Values.config.prefetch.enabled}}
cache 30 {
prefetch {{ .Values.config.prefetch.amount }} {{ .Values.config.prefetch.duration }} {{ .Values.config.prefetch.percentage }}
}
{{- else }}
cache 30
{{- end }}
reload
loop
{{- if .Values.config.bindIp }}
Expand All @@ -47,7 +56,13 @@ data:
}
ip6.arpa:53 {
errors
{{- if .Values.config.prefetch.enabled}}
cache 30 {
prefetch {{ .Values.config.prefetch.amount }} {{ .Values.config.prefetch.duration }} {{ .Values.config.prefetch.percentage }}
}
{{- else }}
cache 30
{{- end }}
reload
loop
{{- if .Values.config.bindIp }}
Expand All @@ -62,7 +77,13 @@ data:
}
.:53 {
errors
{{- if .Values.config.prefetch.enabled}}
cache 30 {
prefetch {{ .Values.config.prefetch.amount }} {{ .Values.config.prefetch.duration }} {{ .Values.config.prefetch.percentage }}
}
{{- else }}
cache 30
{{- end }}
reload
loop
{{- if .Values.config.bindIp }}
Expand Down
7 changes: 7 additions & 0 deletions stable/node-local-dns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ config:
# Set communication protocol. Options are `prefer_udp` or `force_tcp`
commProtocol: "force_tcp"

# If enabled, coredns will prefetch popular items when they are about to be expunged from the cache. https://coredns.io/plugins/cache/
prefetch:
enabled: false
amount: 3
duration: 30s
percentage: 20%

# Port used for the health endpoint
healthPort: 8080

Expand Down
Loading