Commit 1767835
feat(supervisor): KUBERNETES_WORKER_ENV_FROM_SECRET — envFrom secret on every worker pod
Adds a single env var on the supervisor that names a Kubernetes Secret to
mount via `envFrom` on every worker pod the supervisor schedules. All
key/value pairs in the secret become env vars on the worker container —
resolved by the kubelet at pod creation, so the supervisor never reads
the secret values and needs no extra RBAC.
Use case: keep task-time secrets (DB URLs, API keys, etc.) in Kubernetes
Secrets owned by ops, instead of syncing them through trigger.dev's
webapp + database. Single source of truth in K8s; the secret never
leaves the K8s plane on its way to a task pod.
When the env var is unset (default) the worker pod spec is unchanged —
upstream behavior preserved.
Configured downstream via:
supervisor:
extraEnvVars:
- name: KUBERNETES_WORKER_ENV_FROM_SECRET
value: "trigger-task-secrets"
Renders as:
spec.containers[0].envFrom = [{ secretRef: { name: "trigger-task-secrets" } }]
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent d49241f commit 1767835
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
142 | 149 | | |
143 | 150 | | |
144 | 151 | | |
| |||
0 commit comments