Skip to content

Commit

Permalink
Merge pull request #7569 from sapcc/d073579/unbound-maintenance
Browse files Browse the repository at this point in the history
[unbound] make unbound listen on multiple ports
  • Loading branch information
vssldmtrv authored Dec 18, 2024
2 parents 9f17ef9 + 7ea69d9 commit f1b00ae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 6 additions & 2 deletions system/unbound/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ data:
module-config: {{ $unbound_modules | quote }}
interface: {{.Values.unbound.interface}}
port: 53
# let unbound listen on all the ports we've defined as external
# so that we can map them one-to-one
{{- range $.Values.unbound.externalPorts | required ".Values.unbound.externalPorts missing" }}
interface: {{$.Values.unbound.interface}}@{{.}}
{{- end }}

do-ip4: yes
do-ip6: no
do-udp: yes
Expand Down
10 changes: 6 additions & 4 deletions system/unbound/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ spec:
securityContext:
privileged: true
ports:
- name: dns-tcp
containerPort: 53
{{- range $.Values.unbound.externalPorts | required "externalPorts missing" }}
- name: dns-tcp-{{.}}
containerPort: {{.}}
protocol: TCP
- name: dns-udp
containerPort: 53
- name: dns-udp-{{.}}
containerPort: {{.}}
protocol: UDP
{{- end }}
volumeMounts:
- name: unbound-conf
mountPath: /etc/unbound
Expand Down
4 changes: 2 additions & 2 deletions system/unbound/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ spec:
- name: dns-tcp-{{.}}
protocol: TCP
port: {{.}}
targetPort: dns-tcp
targetPort: dns-tcp-{{.}}
- name: dns-udp-{{.}}
protocol: UDP
port: {{.}}
targetPort: dns-udp
targetPort: dns-udp-{{.}}
{{- end }}
externalIPs:
{{- required "A valid .Values.unbound.externalIPs required!" .Values.unbound.externalIPs | toYaml | nindent 2 }}

0 comments on commit f1b00ae

Please sign in to comment.