Skip to content

Commit e1f58fb

Browse files
committed
Merge branch 'jan94_feature-allowEnrollmentJwtFromSecret' of github.com:openziti/helm-charts into jan94_feature-allowEnrollmentJwtFromSecret
2 parents e97c22f + 6cd6472 commit e1f58fb

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

charts/ziti-router/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ identity:
267267
| edge.service.labels | object | `{}` | service labels |
268268
| edge.service.type | string | `"ClusterIP"` | expose the service as a ClusterIP, NodePort, or LoadBalancer; default is ClusterIP, but you could use NodePort or LoadBalancer instead of an ingress controller |
269269
| enrollmentJwt | string | `nil` | enrollment one time token from the controller's management API |
270+
| enrollmentJwtFromSecret | bool | `false` | allow for using a secret to specify the enrollment token instead of using the enrollmentJwt field if enabled, setting the enrollment token on the enrollmentJwt field has no effect |
271+
| enrollmentJwtSecretName | string | `""` | set the enrollment jwt from a secret The enrollment token secret must be of the following format: apiVersion: v1 kind: Secret metadata: name: myEnrollmentJwtSecret type: Opaque data: enrollmentJwt: |
270272
| env | object | `{}` | assign key=value in pod environment |
271273
| execMountDir | string | `"/usr/local/bin"` | read-only mountpoint for executables (must be in image's executable search PATH) |
272274
| fabric.metrics.enabled | bool | `false` | configure fabric metrics in the router config |

charts/ziti-router/templates/deployment.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,14 @@ spec:
5959
{{- end }}
6060
env:
6161
- name: ZITI_ENROLL_TOKEN
62+
{{- if .Values.enrollmentJwtFromSecret }}
63+
valueFrom:
64+
secretKeyRef:
65+
name: {{ required (printf "You must set an enrollmentJwtSecretName, when using enrollmentJwtFromSecret. Try setting --set enrollmentJwtSecretName=myEnrollmentJwtSecret") .Values.enrollmentJwtSecretName }}
66+
key: enrollmentJwt
67+
{{- else }}
6268
value: {{ .Values.enrollmentJwt | quote }}
69+
{{- end }}
6370
# must be true or enroll() will not be called
6471
- name: ZITI_BOOTSTRAP
6572
value: "true"

charts/ziti-router/values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,19 @@ csr:
249249
execMountDir: /usr/local/bin
250250
# -- enrollment one time token from the controller's management API
251251
enrollmentJwt:
252+
# -- allow for using a secret to specify the enrollment token instead of using the enrollmentJwt field
253+
# if enabled, setting the enrollment token on the enrollmentJwt field has no effect
254+
enrollmentJwtFromSecret: false
255+
# -- set the enrollment jwt from a secret
256+
# The enrollment token secret must be of the following format:
257+
# apiVersion: v1
258+
# kind: Secret
259+
# metadata:
260+
# name: myEnrollmentJwtSecret
261+
# type: Opaque
262+
# data:
263+
# enrollmentJwt:
264+
enrollmentJwtSecretName: ""
252265
# -- read-only mountpoint for router identity secret specified in deployment for use by router run container
253266
identityMountDir: /etc/ziti/identity
254267
# -- writeable mountpoint where read-only config file is projected to allow router

0 commit comments

Comments
 (0)