Skip to content

Commit f51320c

Browse files
committed
docs: correct why an existing secret must carry the provider and coordinator keys
1 parent c5f5710 commit f51320c

3 files changed

Lines changed: 16 additions & 10 deletions

File tree

apps/supervisor/src/workloadManager/kubernetes.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { PlacementTagProcessor } from "@trigger.dev/core/v3/serverOnly";
1414
import { env } from "../env.js";
1515
import { type K8sApi, createK8sApi, type k8s } from "../clients/kubernetes.js";
1616
import { getRunnerId } from "../util.js";
17-
import { withBlockIoUringSeccompProfile } from "./kubernetesPodSpec.js";
17+
import { nodetypeNodeSelector, withBlockIoUringSeccompProfile } from "./kubernetesPodSpec.js";
1818

1919
type ResourceQuantities = {
2020
[K in "cpu" | "memory" | "ephemeral-storage"]?: string;
@@ -329,13 +329,7 @@ export class KubernetesWorkloadManager implements WorkloadManager {
329329
schedulerName: env.KUBERNETES_SCHEDULER_NAME,
330330
}
331331
: {}),
332-
...(env.KUBERNETES_WORKER_NODETYPE_LABEL
333-
? {
334-
nodeSelector: {
335-
nodetype: env.KUBERNETES_WORKER_NODETYPE_LABEL,
336-
},
337-
}
338-
: {}),
332+
...nodetypeNodeSelector(env.KUBERNETES_WORKER_NODETYPE_LABEL),
339333
...(env.KUBERNETES_POD_DNS_NDOTS_OVERRIDE_ENABLED
340334
? {
341335
dnsConfig: {

apps/supervisor/src/workloadManager/kubernetesPodSpec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ import type { k8s } from "../clients/kubernetes.js";
66
*/
77
export const BLOCK_IO_URING_SECCOMP_PROFILE = "profiles/block-io-uring.json";
88

9+
/**
10+
* An empty label is the documented off-switch: run pods then get no nodeSelector
11+
* at all. The Helm chart ships an empty value, so don't collapse this into a
12+
* fallback default - that would pin every chart install to a label its nodes
13+
* don't carry.
14+
*/
15+
export function nodetypeNodeSelector(
16+
label: string | undefined
17+
): Pick<k8s.V1PodSpec, "nodeSelector"> {
18+
return label ? { nodeSelector: { nodetype: label } } : {};
19+
}
20+
921
/**
1022
* Node >= 24 always creates io_uring fds, which can't be checkpointed. Blocking
1123
* io_uring_setup makes libuv fall back to epoll. Other runtimes don't need this,

docs/self-hosting/kubernetes.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ secrets:
153153
existingSecret: "your-existing-secret"
154154
```
155155
156-
`PROVIDER_SECRET` and `COORDINATOR_SECRET` are not new secrets. Chart 4.5.6 made the webapp reject the shared, previously-published defaults these used to fall back to, so an existing Secret must now carry strong, unique values for both:
156+
The chart wires `PROVIDER_SECRET` and `COORDINATOR_SECRET` into the webapp deployment, and the pre-upgrade check requires both, so an existing Secret must include them. For a deployment that already runs, add them before upgrading:
157157

158158
```bash
159159
kubectl patch secret my-trigger-secrets -n trigger --type merge -p \
@@ -539,7 +539,7 @@ With external datastores, secrets, registry, and authentication in place, you ha
539539
<Accordion title="You supply your own secret (secrets.existingSecret)">
540540
With `secrets.existingSecret` set, the chart reads every key from your Secret and generates none, so any key the app needs must already be present there.
541541

542-
Chart 4.5.6 hardened this: the webapp now requires strong, unique `PROVIDER_SECRET` and `COORDINATOR_SECRET` values — it previously fell back to a shared, published default for these, which it now rejects at startup. Add both to your Secret before upgrading:
542+
As of chart 4.5.6 the webapp deployment references `PROVIDER_SECRET` and `COORDINATOR_SECRET`, and the pre-upgrade check requires both, so an existing Secret must carry them. Add both before upgrading:
543543

544544
```bash
545545
kubectl patch secret my-trigger-secrets -n trigger --type merge -p \

0 commit comments

Comments
 (0)