Skip to content

Commit

Permalink
feat(pihole): allow setting node port through values (#193)
Browse files Browse the repository at this point in the history
Allow setting node port through values
  • Loading branch information
pascaliske authored Oct 26, 2021
1 parent 1311464 commit 5e702a4
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/pihole/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
3 changes: 3 additions & 0 deletions charts/pihole/templates/service-dns-tcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/pihole/templates/service-dns-udp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions charts/pihole/templates/service-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/pihole/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5e702a4

Please sign in to comment.