Skip to content

Commit 7abefab

Browse files
committed
refactor: clean up chart interface
1 parent e058af6 commit 7abefab

7 files changed

Lines changed: 28 additions & 67 deletions

File tree

chart/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
labels:
88
{{- include "pint.labels" . | nindent 4 }}
99
spec:
10-
replicas: {{ .Values.pint.replicaCount }}
10+
replicas: 1
1111
selector:
1212
matchLabels:
1313
{{- include "pint.selectorLabels" . | nindent 6 }}

chart/templates/freeradius-deployment.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ spec:
2323
ports:
2424
- containerPort: 2083
2525
name: radsec
26-
{{- with .Values.freeradius.securityContext }}
2726
securityContext:
28-
{{- toYaml . | nindent 12 }}
29-
{{- end }}
27+
runAsNonRoot: true
28+
allowPrivilegeEscalation: false
29+
capabilities:
30+
drop: [ALL]
3031
volumeMounts:
3132
# Full-directory mount (not subPath) so K8s auto-syncs clients.conf
3233
# when the Secret changes; FreeRADIUS picks it up on the next SIGHUP.

chart/templates/freeradius-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spec:
1111
selector:
1212
{{- include "pint.freeradiusSelectorLabels" . | nindent 4 }}
1313
ports:
14-
- port: {{ .Values.freeradius.service.port }}
14+
- port: 2083
1515
targetPort: radsec
1616
name: radsec
1717
{{- if and (eq .Values.freeradius.service.type "NodePort") .Values.freeradius.service.nodePort }}

chart/templates/route.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ spec:
1717
port:
1818
targetPort: http
1919
tls:
20-
termination: {{ .Values.openshift.route.tls.termination }}
21-
insecureEdgeTerminationPolicy: {{ .Values.openshift.route.tls.insecureEdgeTerminationPolicy }}
20+
termination: edge
21+
insecureEdgeTerminationPolicy: Redirect
2222
{{- end }}

chart/values-dev.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,3 @@ freeradius:
2626
service:
2727
type: NodePort
2828
nodePort: 32083
29-
# kind has no SCC restrictions; default permissions are fine.
30-
securityContext: {}

chart/values.schema.json

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,13 @@
4949
},
5050
"ipaCAName": {
5151
"type": "string",
52-
"description": "FreeIPA CA name for WiFi client certificates."
52+
"description": "FreeIPA CA name for WiFi client certificates.",
53+
"default": "ipa"
5354
},
5455
"ipaRadSecCAName": {
5556
"type": "string",
56-
"description": "FreeIPA CA name for RadSec certificates."
57+
"description": "FreeIPA CA name for RadSec certificates.",
58+
"default": "radsec"
5759
},
5860
"ipaRootCAName": {
5961
"type": "string",
@@ -62,15 +64,18 @@
6264
},
6365
"ipaCertProfile": {
6466
"type": "string",
65-
"description": "Dogtag certificate profile for WiFi client certs. Leave blank to use the CA default."
67+
"description": "Dogtag certificate profile for WiFi client certs.",
68+
"default": "pint_wifi"
6669
},
6770
"ipaRadSecClientCertProfile": {
6871
"type": "string",
69-
"description": "Dogtag certificate profile for RadSec router client certs. Leave blank to use the CA default."
72+
"description": "Dogtag certificate profile for RadSec router client certs.",
73+
"default": "pint_radsec_client"
7074
},
7175
"ipaRadSecServerCertProfile": {
7276
"type": "string",
73-
"description": "Dogtag certificate profile for the FreeRADIUS server cert. Leave blank to use the CA default."
77+
"description": "Dogtag certificate profile for the FreeRADIUS server cert.",
78+
"default": "pint_radsec_server"
7479
},
7580
"ipaSkipTLSVerify": {
7681
"type": "boolean",
@@ -79,7 +84,8 @@
7984
},
8085
"wifiSSID": {
8186
"type": "string",
82-
"description": "WiFi SSID embedded in generated device profiles."
87+
"description": "WiFi SSID embedded in generated device profiles.",
88+
"default": "CSH"
8389
},
8490
"radiusServer": {
8591
"type": "string",
@@ -118,12 +124,6 @@
118124
"description": "Deploy the PINT pod. Set false to run PINT as a local process instead.",
119125
"default": true
120126
},
121-
"replicaCount": {
122-
"type": "integer",
123-
"minimum": 1,
124-
"description": "Number of PINT replicas.",
125-
"default": 1
126-
},
127127
"image": {
128128
"type": "object",
129129
"properties": {
@@ -195,19 +195,11 @@
195195
"enum": ["ClusterIP", "NodePort", "LoadBalancer"],
196196
"default": "LoadBalancer"
197197
},
198-
"port": {
199-
"type": "integer",
200-
"default": 2083
201-
},
202198
"nodePort": {
203199
"type": ["integer", "null"],
204200
"description": "NodePort number. Only used when service.type is NodePort."
205201
}
206202
}
207-
},
208-
"securityContext": {
209-
"type": "object",
210-
"description": "Pod security context for FreeRADIUS. Override to {} for environments without pod security enforcement."
211203
}
212204
}
213205
},
@@ -225,22 +217,7 @@
225217
"properties": {
226218
"host": {
227219
"type": "string",
228-
"description": "Route hostname. Leave blank for an auto-assigned hostname."
229-
},
230-
"tls": {
231-
"type": "object",
232-
"properties": {
233-
"termination": {
234-
"type": "string",
235-
"enum": ["edge", "reencrypt", "passthrough"],
236-
"default": "edge"
237-
},
238-
"insecureEdgeTerminationPolicy": {
239-
"type": "string",
240-
"enum": ["Allow", "Redirect", "None"],
241-
"default": "Redirect"
242-
}
243-
}
220+
"description": "Route hostname. Omit for an auto-assigned hostname."
244221
}
245222
}
246223
}

chart/values.yaml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ serviceAccount:
88
# Set enabled=false in dev to run PINT as a local process (make dev) instead.
99
pint:
1010
enabled: true
11-
replicaCount: 1
1211
image:
1312
repository: pint
1413
tag: "" # defaults to Chart.appVersion
@@ -25,17 +24,16 @@ config:
2524
# FreeIPA
2625
ipaHost: ""
2726
ipaServiceAccount: ""
28-
ipaCAName: ""
29-
ipaRadSecCAName: ""
27+
ipaCAName: "ipa"
28+
ipaRadSecCAName: "radsec"
3029
ipaRootCAName: "ipa"
31-
# Optional Dogtag cert profiles; leave blank to use CA defaults.
32-
ipaCertProfile: ""
33-
ipaRadSecClientCertProfile: ""
34-
ipaRadSecServerCertProfile: ""
30+
ipaCertProfile: "pint_wifi"
31+
ipaRadSecClientCertProfile: "pint_radsec_client"
32+
ipaRadSecServerCertProfile: "pint_radsec_server"
3533
ipaSkipTLSVerify: false
3634

3735
# WiFi
38-
wifiSSID: ""
36+
wifiSSID: "CSH"
3937

4038
# RADIUS
4139
radiusServer: ""
@@ -68,23 +66,10 @@ freeradius:
6866
pullPolicy: IfNotPresent
6967
service:
7068
type: LoadBalancer
71-
port: 2083
7269
nodePort: null # only used when type=NodePort
73-
# Run as the freerad user (UID 101); Secret defaultMode 0444 ensures cert
74-
# files are readable without root. Override to {} for environments without
75-
# pod security enforcement (e.g. local kind).
76-
securityContext:
77-
runAsNonRoot: true
78-
runAsUser: 101
79-
allowPrivilegeEscalation: false
80-
capabilities:
81-
drop: [ALL]
8270

8371
# OpenShift-specific resources.
8472
openshift:
8573
enabled: false
8674
route:
87-
host: "" # leave blank for an auto-assigned hostname
88-
tls:
89-
termination: edge
90-
insecureEdgeTerminationPolicy: Redirect
75+
host: ""

0 commit comments

Comments
 (0)