Skip to content

Commit f1d5315

Browse files
committed
feat: make DNS and DHCP container ports configurable
Replace hardcoded port values (53 for DNS, 67 for DHCP) with configurable values from serviceDns.port and serviceDhcp.port in deployment and service templates. Inspired by MoJo2600#401
1 parent 8621171 commit f1d5315

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

charts/pihole/templates/deployment.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ spec:
247247
- containerPort: {{ .Values.webHttp }}
248248
name: http
249249
protocol: TCP
250-
- containerPort: 53
250+
- containerPort: {{ .Values.serviceDns.port }}
251251
name: dns
252252
protocol: TCP
253253
{{- if .Values.dnsHostPort.enabled }}
254254
hostPort: {{ .Values.dnsHostPort.port }}
255255
{{- end }}
256-
- containerPort: 53
256+
- containerPort: {{ .Values.serviceDns.port }}
257257
name: dns-udp
258258
protocol: UDP
259259
{{- if .Values.dnsHostPort.enabled }}
@@ -262,7 +262,7 @@ spec:
262262
- containerPort: {{ .Values.webHttps }}
263263
name: https
264264
protocol: TCP
265-
- containerPort: 67
265+
- containerPort: {{ .Values.serviceDhcp.port }}
266266
name: client-udp
267267
protocol: UDP
268268
{{- if .Values.probes.liveness.enabled }}

charts/pihole/templates/service-dhcp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ spec:
6666
externalTrafficPolicy: {{ .Values.serviceDhcp.externalTrafficPolicy }}
6767
{{- end }}
6868
ports:
69-
- port: 67
69+
- port: {{ .Values.serviceDhcp.port }}
7070
targetPort: client-udp
7171
protocol: UDP
7272
name: client-udp

0 commit comments

Comments
 (0)