Skip to content

Commit 2412cd7

Browse files
committed
fix: only expose status port in NodePort service when nodePort is set
PINT queries the FreeRADIUS status server directly via pod IP, so the status port has no business being on the external NodePort service. Gate the status port entry on statusServer.nodePort being explicitly set so it only appears in dev (kind) and never in prod.
1 parent 028eb47 commit 2412cd7

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

chart/templates/freeradius-service.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ spec:
1717
{{- if and (eq .Values.freeradius.service.type "NodePort") .Values.freeradius.service.nodePort }}
1818
nodePort: {{ .Values.freeradius.service.nodePort }}
1919
{{- end }}
20-
{{- if .Values.freeradius.statusServer.enabled }}
20+
{{- if and .Values.freeradius.statusServer.enabled .Values.freeradius.statusServer.nodePort }}
2121
- port: 18121
2222
targetPort: status
2323
protocol: UDP
2424
name: status
25-
{{- if and (eq .Values.freeradius.service.type "NodePort") .Values.freeradius.statusServer.nodePort }}
2625
nodePort: {{ .Values.freeradius.statusServer.nodePort }}
27-
{{- end }}
2826
{{- end }}
2927
{{- end }}

chart/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ freeradius:
7474
statusServer:
7575
enabled: true
7676
clientCIDR: "0.0.0.0/0" # CIDR allowed to query the status server; restrict to pod CIDR in production
77-
nodePort: null # UDP NodePort for status server; only used when freeradius.service.type=NodePort
77+
nodePort: null # set to expose status port via NodePort (dev only; PINT queries pods directly in prod)
7878
securityContext:
7979
runAsNonRoot: true
8080
allowPrivilegeEscalation: false

0 commit comments

Comments
 (0)