diff --git a/charts/pihole/Chart.yaml b/charts/pihole/Chart.yaml index 21ca49f7..6ea6c5b5 100644 --- a/charts/pihole/Chart.yaml +++ b/charts/pihole/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 description: Installs pihole in kubernetes home: https://github.com/MoJo2600/pihole-kubernetes/tree/master/charts/pihole name: pihole -version: 2.5.0 +version: 2.5.1 sources: - https://github.com/MoJo2600/pihole-kubernetes/tree/master/charts/pihole - https://pi-hole.net/ diff --git a/charts/pihole/templates/service-dns-tcp.yaml b/charts/pihole/templates/service-dns-tcp.yaml index b99792d6..92062601 100644 --- a/charts/pihole/templates/service-dns-tcp.yaml +++ b/charts/pihole/templates/service-dns-tcp.yaml @@ -29,6 +29,9 @@ spec: ports: - port: {{ .Values.serviceDns.port }} targetPort: dns + {{- if and (.Values.serviceDns.nodePort) (eq .Values.serviceDns.type "NodePort") }} + nodePort: {{ .Values.serviceDns.nodePort }} + {{- end }} protocol: TCP name: dns {{- if .Values.monitoring.sidecar.enabled }} diff --git a/charts/pihole/templates/service-dns-udp.yaml b/charts/pihole/templates/service-dns-udp.yaml index 4f03d73e..34835d46 100644 --- a/charts/pihole/templates/service-dns-udp.yaml +++ b/charts/pihole/templates/service-dns-udp.yaml @@ -29,6 +29,9 @@ spec: ports: - port: {{ .Values.serviceDns.port }} targetPort: dns-udp + {{- if and (.Values.serviceDns.nodePort) (eq .Values.serviceDns.type "NodePort") }} + nodePort: {{ .Values.serviceDns.nodePort }} + {{- end }} protocol: UDP name: dns-udp selector: diff --git a/charts/pihole/templates/service-dns.yaml b/charts/pihole/templates/service-dns.yaml index 5eaf97fb..0772138e 100644 --- a/charts/pihole/templates/service-dns.yaml +++ b/charts/pihole/templates/service-dns.yaml @@ -23,10 +23,16 @@ spec: ports: - port: {{ .Values.serviceDns.port }} targetPort: dns + {{- if .Values.serviceDns.nodePort }} + nodePort: {{ .Values.serviceDns.nodePort }} + {{- end }} protocol: TCP name: dns - port: {{ .Values.serviceDns.port }} targetPort: dns-udp + {{- if and (.Values.serviceDns.nodePort) (eq .Values.serviceDns.type "NodePort") }} + nodePort: {{ .Values.serviceDns.nodePort }} + {{- end }} protocol: UDP name: dns-udp {{- if .Values.monitoring.sidecar.enabled }} diff --git a/charts/pihole/values.yaml b/charts/pihole/values.yaml index 61415c56..f8114498 100644 --- a/charts/pihole/values.yaml +++ b/charts/pihole/values.yaml @@ -44,6 +44,9 @@ serviceDns: # -- The port of the DNS service port: 53 + # -- Optional node port for the DNS service + nodePort: "" + # -- `spec.externalTrafficPolicy` for the DHCP Service externalTrafficPolicy: Local