Skip to content

Commit

Permalink
[stable/node-local-dns]: Customize bind ip (#563)
Browse files Browse the repository at this point in the history
* Customize bind ip

* fix readme

* readme

---------

Co-authored-by: Sarga <[email protected]>
  • Loading branch information
Sarga and Sarga authored Feb 20, 2024
1 parent 60b4496 commit 915a575
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
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.4
version: 2.0.5
appVersion: 1.22.23
maintainers:
- name: gabrieladt
Expand Down
3 changes: 2 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.4](https://img.shields.io/badge/Version-2.0.4-informational?style=flat-square) ![AppVersion: 1.22.23](https://img.shields.io/badge/AppVersion-1.22.23-informational?style=flat-square)
![Version: 2.0.5](https://img.shields.io/badge/Version-2.0.5-informational?style=flat-square) ![AppVersion: 1.22.23](https://img.shields.io/badge/AppVersion-1.22.23-informational?style=flat-square)

A chart to install node-local-dns.

Expand Down Expand Up @@ -49,6 +49,7 @@ helm install my-release deliveryhero/node-local-dns -f values.yaml
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| config.bindIp | bool | `false` | |
| config.commProtocol | string | `"force_tcp"` | |
| config.customConfig | string | `""` | |
| config.dnsDomain | string | `"cluster.local"` | |
Expand Down
16 changes: 16 additions & 0 deletions stable/node-local-dns/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ data:
}
reload
loop
{{- if .Values.config.bindIp -}}
bind {{ .Values.config.localDns }} {{ .Values.config.dnsServer }}
{{- else }}
bind 0.0.0.0
{{ end }}
forward . __PILLAR__CLUSTER__DNS__ {
{{ .Values.config.commProtocol }}
}
Expand All @@ -31,7 +35,11 @@ data:
cache 30
reload
loop
{{- if .Values.config.bindIp -}}
bind {{ .Values.config.localDns }} {{ .Values.config.dnsServer }}
{{- else }}
bind 0.0.0.0
{{ end }}
forward . __PILLAR__CLUSTER__DNS__ {
{{ .Values.config.commProtocol }}
}
Expand All @@ -42,7 +50,11 @@ data:
cache 30
reload
loop
{{- if .Values.config.bindIp -}}
bind {{ .Values.config.localDns }} {{ .Values.config.dnsServer }}
{{- else }}
bind 0.0.0.0
{{ end }}
forward . __PILLAR__CLUSTER__DNS__ {
{{ .Values.config.commProtocol }}
}
Expand All @@ -53,7 +65,11 @@ data:
cache 30
reload
loop
{{- if .Values.config.bindIp -}}
bind {{ .Values.config.localDns }} {{ .Values.config.dnsServer }}
{{- else }}
bind 0.0.0.0
{{ end }}
forward . __PILLAR__UPSTREAM__SERVERS__
prometheus :9253
}
Expand Down
3 changes: 3 additions & 0 deletions stable/node-local-dns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ config:
# Virtual IP to be used by ipvs mode, to be used as --cluster-dns, must not collide.
localDns: "169.254.20.25"

# If true, it will bind 0.0.0.0, otherwise dnsServer and localDns will be used. https://github.com/bottlerocket-os/bottlerocket/issues/3711#issuecomment-1907087528
bindIp: false

# Set communication protocol. Options are `prefer_udp` or `force_tcp`
commProtocol: "force_tcp"

Expand Down

0 comments on commit 915a575

Please sign in to comment.