Skip to content

Commit d5b97f1

Browse files
committed
feat: add device map secret to helm chart
Add pint.secretName.deviceMap helper, secrets.deviceMap value, PINT_DEVICE_MAP_SECRET env var in the deployment, RBAC permission on the secret, and schema entries for both deviceMap and the previously missing scepRACert.
1 parent d6aa7cf commit d5b97f1

5 files changed

Lines changed: 16 additions & 0 deletions

File tree

chart/templates/_helpers.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ never collide. Each can be overridden via the corresponding values key.
6262
{{- .Values.secrets.scepRACert | default (printf "%s-scep-ra-cert" (include "pint.fullname" .)) }}
6363
{{- end }}
6464

65+
{{- define "pint.secretName.deviceMap" -}}
66+
{{- .Values.secrets.deviceMap | default (printf "%s-device-map" (include "pint.fullname" .)) }}
67+
{{- end }}
68+
6569
{{- define "pint.envSecret" -}}
6670
{{- .Values.envSecret | default (include "pint.fullname" .) }}
6771
{{- end }}

chart/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ spec:
9696
value: {{ include "pint.secretName.radSecCert" . | quote }}
9797
- name: PINT_SCEP_RA_CERT_SECRET
9898
value: {{ include "pint.secretName.scepRACert" . | quote }}
99+
- name: PINT_DEVICE_MAP_SECRET
100+
value: {{ include "pint.secretName.deviceMap" . | quote }}
99101
{{- if .Values.freeradius.enabled }}
100102
- name: PINT_FREERADIUS_DEPLOYMENT
101103
value: {{ include "pint.freeradiusFullname" . | quote }}

chart/templates/role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ rules:
1616
- {{ include "pint.secretName.radSecCert" . | quote }}
1717
- {{ include "pint.secretName.scepRACert" . | quote }}
1818
- {{ include "pint.secretName.profileSigningCert" . | quote }}
19+
- {{ include "pint.secretName.deviceMap" . | quote }}
1920
verbs: ["get", "patch", "update"]
2021
- apiGroups: ["apps"]
2122
resources: ["deployments"]

chart/values.schema.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@
135135
"profileSigningCert": {
136136
"type": "string",
137137
"description": "Secret storing the iOS mobileconfig signing certificate and key. Defaults to '<fullname>-profile-signing-cert'."
138+
},
139+
"scepRACert": {
140+
"type": "string",
141+
"description": "Secret storing the SCEP RA certificate and key. Defaults to '<fullname>-scep-ra-cert'."
142+
},
143+
"deviceMap": {
144+
"type": "string",
145+
"description": "Secret storing the cert serial to device info map. Defaults to '<fullname>-device-map'."
138146
}
139147
}
140148
},

chart/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ secrets:
6666
radSecCert: "" # default: <fullname>-radsec-server-certificates (tls.crt, tls.key, ca.pem, wifi-ca.pem)
6767
profileSigningCert: "" # default: <fullname>-profile-signing-cert (tls.crt, tls.key)
6868
scepRACert: "" # default: <fullname>-scep-ra-cert (tls.crt, tls.key); auto-generated on first startup
69+
deviceMap: "" # default: <fullname>-device-map (device-map.json); auto-created on first SCEP enrollment
6970

7071
service:
7172
type: ClusterIP

0 commit comments

Comments
 (0)