Skip to content

Commit ae45a16

Browse files
committed
supervisor bootstrap config
1 parent c443227 commit ae45a16

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

hosting/k8s/helm/templates/supervisor.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,16 @@ spec:
117117
- name: TRIGGER_API_URL
118118
value: "http://{{ include "trigger-v4.fullname" . }}-webapp:{{ .Values.webapp.service.port }}"
119119
- name: TRIGGER_WORKER_TOKEN
120-
value: "file:///home/node/shared/worker_token"
120+
{{- if .Values.supervisor.bootstrap.enabled }}
121+
value: "file://{{ .Values.supervisor.bootstrap.workerTokenPath }}"
122+
{{- else if .Values.supervisor.bootstrap.workerToken.secret.name }}
123+
valueFrom:
124+
secretKeyRef:
125+
name: {{ .Values.supervisor.bootstrap.workerToken.secret.name }}
126+
key: {{ .Values.supervisor.bootstrap.workerToken.secret.key }}
127+
{{- else }}
128+
value: {{ .Values.supervisor.bootstrap.workerToken.value | quote }}
129+
{{- end }}
121130
{{- if .Values.secrets.enabled }}
122131
- name: MANAGED_WORKER_SECRET
123132
valueFrom:

hosting/k8s/helm/values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,19 @@ supervisor:
531531
labels: {}
532532
basicAuth: {}
533533

534+
# Bootstrap configuration
535+
# When enabled: reads token from shared file, otherwise uses workerToken config
536+
bootstrap:
537+
enabled: true
538+
workerTokenPath: "/home/node/shared/worker_token"
539+
workerToken:
540+
# Direct value (not recommended for production)
541+
value: ""
542+
# Secret reference
543+
secret:
544+
name: ""
545+
key: ""
546+
534547
nodeSelector: {}
535548
tolerations: []
536549
affinity: {}

0 commit comments

Comments
 (0)