lastlight-core 0.21.11 → 0.21.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/k8s/README.md +111 -34
- package/deploy/k8s/architecture.md +199 -0
- package/deploy/k8s/configmap.yaml +14 -3
- package/deploy/k8s/harness-deployment.yaml +111 -0
- package/deploy/k8s/kustomization.yaml +10 -8
- package/deploy/k8s/sandbox-namespace.yaml +14 -0
- package/deploy/k8s/sandbox-quota.yaml +37 -0
- package/deploy/k8s/sandbox-rbac.yaml +60 -0
- package/dist/admin/routes.js +66 -10
- package/dist/admin/routes.js.map +1 -1
- package/dist/config/config.d.ts +36 -0
- package/dist/config/config.js +101 -3
- package/dist/config/config.js.map +1 -1
- package/dist/cron/review-discovery.d.ts +54 -0
- package/dist/cron/review-discovery.js +70 -0
- package/dist/cron/review-discovery.js.map +1 -0
- package/dist/engine/executors/orchestrator.js +124 -58
- package/dist/engine/executors/orchestrator.js.map +1 -1
- package/dist/engine/github/github.d.ts +8 -0
- package/dist/engine/github/github.js +14 -0
- package/dist/engine/github/github.js.map +1 -1
- package/dist/engine/github/profiles.d.ts +12 -1
- package/dist/engine/github/profiles.js +33 -1
- package/dist/engine/github/profiles.js.map +1 -1
- package/dist/index.js +55 -14
- package/dist/index.js.map +1 -1
- package/dist/sandbox/artifact-backend.d.ts +40 -0
- package/dist/sandbox/artifact-backend.js +67 -0
- package/dist/sandbox/artifact-backend.js.map +1 -0
- package/dist/sandbox/artifact-store.d.ts +55 -0
- package/dist/sandbox/artifact-store.js +203 -0
- package/dist/sandbox/artifact-store.js.map +1 -0
- package/dist/sandbox/docker.d.ts +2 -1
- package/dist/sandbox/docker.js +3 -3
- package/dist/sandbox/docker.js.map +1 -1
- package/dist/sandbox/k8s/agent-context-registry.d.ts +25 -0
- package/dist/sandbox/k8s/agent-context-registry.js +45 -0
- package/dist/sandbox/k8s/agent-context-registry.js.map +1 -0
- package/dist/sandbox/k8s/agent-context-route.d.ts +13 -0
- package/dist/sandbox/k8s/agent-context-route.js +21 -0
- package/dist/sandbox/k8s/agent-context-route.js.map +1 -0
- package/dist/sandbox/k8s/artifact-upload-route.d.ts +12 -0
- package/dist/sandbox/k8s/artifact-upload-route.js +40 -0
- package/dist/sandbox/k8s/artifact-upload-route.js.map +1 -0
- package/dist/sandbox/k8s/client.d.ts +22 -0
- package/dist/sandbox/k8s/client.js +35 -0
- package/dist/sandbox/k8s/client.js.map +1 -0
- package/dist/sandbox/k8s/egress-apply.d.ts +14 -0
- package/dist/sandbox/k8s/egress-apply.js +44 -0
- package/dist/sandbox/k8s/egress-apply.js.map +1 -0
- package/dist/sandbox/k8s/egress-ensurer.d.ts +37 -0
- package/dist/sandbox/k8s/egress-ensurer.js +54 -0
- package/dist/sandbox/k8s/egress-ensurer.js.map +1 -0
- package/dist/sandbox/k8s/egress-policy.d.ts +112 -0
- package/dist/sandbox/k8s/egress-policy.js +118 -0
- package/dist/sandbox/k8s/egress-policy.js.map +1 -0
- package/dist/sandbox/k8s/init-agent-context.d.ts +20 -0
- package/dist/sandbox/k8s/init-agent-context.js +35 -0
- package/dist/sandbox/k8s/init-agent-context.js.map +1 -0
- package/dist/sandbox/k8s/init-clone.d.ts +53 -0
- package/dist/sandbox/k8s/init-clone.js +114 -0
- package/dist/sandbox/k8s/init-clone.js.map +1 -0
- package/dist/sandbox/k8s/init-skills.d.ts +13 -0
- package/dist/sandbox/k8s/init-skills.js +28 -0
- package/dist/sandbox/k8s/init-skills.js.map +1 -0
- package/dist/sandbox/k8s/kubernetes-sandbox.d.ts +179 -0
- package/dist/sandbox/k8s/kubernetes-sandbox.js +418 -0
- package/dist/sandbox/k8s/kubernetes-sandbox.js.map +1 -0
- package/dist/sandbox/k8s/log-stream.d.ts +4 -0
- package/dist/sandbox/k8s/log-stream.js +43 -0
- package/dist/sandbox/k8s/log-stream.js.map +1 -0
- package/dist/sandbox/k8s/naming.d.ts +19 -0
- package/dist/sandbox/k8s/naming.js +35 -0
- package/dist/sandbox/k8s/naming.js.map +1 -0
- package/dist/sandbox/k8s/pod-lifecycle.d.ts +40 -0
- package/dist/sandbox/k8s/pod-lifecycle.js +151 -0
- package/dist/sandbox/k8s/pod-lifecycle.js.map +1 -0
- package/dist/sandbox/k8s/pod-status.d.ts +46 -0
- package/dist/sandbox/k8s/pod-status.js +83 -0
- package/dist/sandbox/k8s/pod-status.js.map +1 -0
- package/dist/sandbox/k8s/pod.d.ts +79 -0
- package/dist/sandbox/k8s/pod.js +115 -0
- package/dist/sandbox/k8s/pod.js.map +1 -0
- package/dist/sandbox/k8s/pvc.d.ts +20 -0
- package/dist/sandbox/k8s/pvc.js +26 -0
- package/dist/sandbox/k8s/pvc.js.map +1 -0
- package/dist/sandbox/k8s/quota.d.ts +34 -0
- package/dist/sandbox/k8s/quota.js +52 -0
- package/dist/sandbox/k8s/quota.js.map +1 -0
- package/dist/sandbox/k8s/reclaim.d.ts +50 -0
- package/dist/sandbox/k8s/reclaim.js +141 -0
- package/dist/sandbox/k8s/reclaim.js.map +1 -0
- package/dist/sandbox/k8s/resource-name.d.ts +33 -0
- package/dist/sandbox/k8s/resource-name.js +49 -0
- package/dist/sandbox/k8s/resource-name.js.map +1 -0
- package/dist/sandbox/k8s/run-agent-script.d.ts +60 -0
- package/dist/sandbox/k8s/run-agent-script.js +48 -0
- package/dist/sandbox/k8s/run-agent-script.js.map +1 -0
- package/dist/sandbox/k8s/run-id.d.ts +23 -0
- package/dist/sandbox/k8s/run-id.js +32 -0
- package/dist/sandbox/k8s/run-id.js.map +1 -0
- package/dist/sandbox/k8s/run-secrets.d.ts +75 -0
- package/dist/sandbox/k8s/run-secrets.js +115 -0
- package/dist/sandbox/k8s/run-secrets.js.map +1 -0
- package/dist/sandbox/k8s/secret.d.ts +20 -0
- package/dist/sandbox/k8s/secret.js +38 -0
- package/dist/sandbox/k8s/secret.js.map +1 -0
- package/dist/sandbox/k8s/skill-bundle-route.d.ts +10 -0
- package/dist/sandbox/k8s/skill-bundle-route.js +18 -0
- package/dist/sandbox/k8s/skill-bundle-route.js.map +1 -0
- package/dist/sandbox/k8s/skill-bundle.d.ts +36 -0
- package/dist/sandbox/k8s/skill-bundle.js +85 -0
- package/dist/sandbox/k8s/skill-bundle.js.map +1 -0
- package/dist/sandbox/k8s/sweep.d.ts +47 -0
- package/dist/sandbox/k8s/sweep.js +29 -0
- package/dist/sandbox/k8s/sweep.js.map +1 -0
- package/dist/sandbox/k8s/workspace-provisioner.d.ts +51 -0
- package/dist/sandbox/k8s/workspace-provisioner.js +64 -0
- package/dist/sandbox/k8s/workspace-provisioner.js.map +1 -0
- package/dist/sandbox/sandbox.d.ts +20 -1
- package/dist/sandbox/sandbox.js +22 -1
- package/dist/sandbox/sandbox.js.map +1 -1
- package/dist/state/workflow-run-store.d.ts +11 -0
- package/dist/state/workflow-run-store.js +19 -0
- package/dist/state/workflow-run-store.js.map +1 -1
- package/dist/workflows/admission.d.ts +19 -0
- package/dist/workflows/admission.js +81 -13
- package/dist/workflows/admission.js.map +1 -1
- package/dist/workflows/handlers/post-review.d.ts +21 -0
- package/dist/workflows/handlers/post-review.js +56 -13
- package/dist/workflows/handlers/post-review.js.map +1 -1
- package/dist/workflows/resume.js +6 -0
- package/dist/workflows/resume.js.map +1 -1
- package/dist/workflows/runner.d.ts +11 -2
- package/dist/workflows/runner.js +73 -15
- package/dist/workflows/runner.js.map +1 -1
- package/dist/workflows/simple.d.ts +13 -1
- package/dist/workflows/simple.js +46 -4
- package/dist/workflows/simple.js.map +1 -1
- package/package.json +21 -20
- package/skills/issue-triage/SKILL.md +17 -0
- package/workflows/cron-review.yaml +14 -1
- package/workflows/dependabot-pr-merge.yaml +14 -9
- package/workflows/issue-triage.yaml +6 -0
- package/workflows/prompts/dependabot-pr-merge.md +53 -11
- package/deploy/k8s/deployment.yaml +0 -63
- package/deploy/k8s/generic-device-plugin.yaml +0 -63
- package/deploy/k8s/namespace.yaml +0 -10
- package/deploy/k8s/pvc.yaml +0 -13
- package/deploy/k8s/service.yaml +0 -12
|
@@ -3,6 +3,19 @@ name: check-prs-awaiting-review
|
|
|
3
3
|
schedule: "*/30 * * * *"
|
|
4
4
|
workflow: pr-review
|
|
5
5
|
context:
|
|
6
|
-
|
|
6
|
+
# `discover: prs-awaiting-review` makes the cron runner (src/index.ts) find the
|
|
7
|
+
# open PRs needing review across managed repos IN CODE
|
|
8
|
+
# (src/cron/review-discovery.ts) and fan out one bounded single-PR `pr-review`
|
|
9
|
+
# run per PR — with prNumber + head ref set, the same shape the pr.opened
|
|
10
|
+
# webhook produces. This replaced the old `mode: scan` run: that single agent
|
|
11
|
+
# listed and reviewed PRs itself inside the sandbox, where it couldn't reliably
|
|
12
|
+
# authenticate (a static token it couldn't re-mint), couldn't pre-clone (no PR
|
|
13
|
+
# known up front), and had no way to hand its chosen PR to the post-review step
|
|
14
|
+
# — so it could never actually post a review. One PR per run fixes all three
|
|
15
|
+
# (real prNumber, fresh per-repo scoped token, pre-cloned head).
|
|
16
|
+
discover: prs-awaiting-review
|
|
7
17
|
condition:
|
|
18
|
+
# Real-time review comes from the pr.opened webhook; this sweep is the fallback
|
|
19
|
+
# for deployments without webhooks configured (and a backstop for missed
|
|
20
|
+
# deliveries). Filtered out when webhooks are enabled.
|
|
8
21
|
unless: webhooksEnabled
|
|
@@ -3,12 +3,15 @@ name: dependabot-pr-merge
|
|
|
3
3
|
description: |
|
|
4
4
|
Assess an already-GREEN dependency-update PR (Dependabot / Renovate) and, when
|
|
5
5
|
the change is trivial, enable GitHub auto-merge (squash) so it lands once its
|
|
6
|
-
checks pass. When a
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
checks pass. When a bump is merely behind the base branch or has a lockfile
|
|
7
|
+
conflict, it asks the bot that opened the PR to rebase/recreate its own branch
|
|
8
|
+
(@dependabot rebase|recreate, or Renovate's rebase label) — it never pushes or
|
|
9
|
+
rebases itself. That branch request is independent of the merge verdict: a
|
|
10
|
+
non-trivial bump (e.g. a major version) still gets its branch regenerated,
|
|
11
|
+
since regenerating is safe and pre-empts no review, but does NOT get
|
|
12
|
+
auto-merge — only trivial bumps do. The companion to dependabot-ci-fix: that
|
|
13
|
+
one repairs a RED bump and pushes a fix; this one merges a GREEN one that
|
|
14
|
+
needs no fix at all.
|
|
12
15
|
|
|
13
16
|
Always runs against a SINGLE PR (`{{prNumber}}`). Triggered by:
|
|
14
17
|
- pr.checks_passed webhook (a check_suite completed with a success
|
|
@@ -46,9 +49,11 @@ phases:
|
|
|
46
49
|
# inspects the ONE PR via `github_list_pull_request_files` (file list + line
|
|
47
50
|
# counts) and skips lockfile diffs, only pulling `github_get_pull_request_diff`
|
|
48
51
|
# for a small non-lockfile source change. It never pushes or rebases itself: a
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
+
# PR that is `behind`/`dirty` is nudged to rebase via the bot's own command
|
|
53
|
+
# (@dependabot rebase|recreate) or Renovate's rebase label. That nudge is NOT
|
|
54
|
+
# gated on the verdict — regenerating a bot's own branch is safe and says
|
|
55
|
+
# nothing about merge-safety — but only a trivial PR also gets auto-merge
|
|
56
|
+
# enabled to land it once GitHub re-runs the checks green. Because
|
|
52
57
|
# each run assesses a single PR, its context is bounded — the overflow that
|
|
53
58
|
# killed the old whole-repo scan can't happen. See prompts/dependabot-pr-merge.md.
|
|
54
59
|
- name: assess
|
|
@@ -20,3 +20,9 @@ phases:
|
|
|
20
20
|
label: Triage
|
|
21
21
|
skill: issue-triage
|
|
22
22
|
model: "{{models.triage}}"
|
|
23
|
+
# Postcondition: the triage skill must end with the TRIAGE_COMPLETE marker,
|
|
24
|
+
# emitted only after the work is actually done (see skills/issue-triage).
|
|
25
|
+
# An agent that bails — no github_* tools, repo inaccessible, "re-invoke me" —
|
|
26
|
+
# never prints it, so the phase fails instead of greening a silent no-op.
|
|
27
|
+
on_output:
|
|
28
|
+
requires_marker: "TRIAGE_COMPLETE"
|
|
@@ -3,11 +3,25 @@ if the change is trivial and safe. You never push code or rebase branches
|
|
|
3
3
|
yourself. You prefer to *enable auto-merge* — which GitHub honours once the
|
|
4
4
|
required checks pass, and refuses on a red or still-running PR — and merge
|
|
5
5
|
directly only in the one narrow case where GitHub rejects auto-merge because the
|
|
6
|
-
PR is already mergeable with no checks to wait on (see STEP 3). When a
|
|
6
|
+
PR is already mergeable with no checks to wait on (see STEP 3). When a PR
|
|
7
7
|
is merely **behind** the base branch or has a lockfile **conflict**, you don't
|
|
8
8
|
give up — you ask the bot that opened it (Dependabot / Renovate) to rebase or
|
|
9
|
-
recreate its own branch
|
|
10
|
-
|
|
9
|
+
recreate its own branch (see STEP 3). You never rebase, merge from base, or push
|
|
10
|
+
yourself.
|
|
11
|
+
|
|
12
|
+
**Two independent decisions.** Keep these apart, because conflating them is how a
|
|
13
|
+
conflicted PR rots:
|
|
14
|
+
- *Is this branch mergeable at all?* — a `behind`/`dirty` branch needs
|
|
15
|
+
regenerating. Asking the bot that opened the PR to do that is **always safe**:
|
|
16
|
+
it merges nothing, pre-empts no review, and just brings the branch up to date.
|
|
17
|
+
So you do it whatever your verdict is.
|
|
18
|
+
- *Is this change safe to land automatically?* — only a TRIVIAL bump earns
|
|
19
|
+
auto-merge. A FUNCTIONAL one is a human's call.
|
|
20
|
+
|
|
21
|
+
A major-version bump with a lockfile conflict is therefore **both**: you request
|
|
22
|
+
the recreate *and* leave the merge to a human. What you must never do is decline
|
|
23
|
+
the recreate because the bump needs review — that just guarantees the human hits
|
|
24
|
+
a conflicted branch when they get to it.
|
|
11
25
|
|
|
12
26
|
You are working against `{{owner}}/{{repo}}`. Interact with GitHub through the
|
|
13
27
|
`github_*` tools only — there is no local checkout.
|
|
@@ -86,10 +100,33 @@ above — never remove a label outside this vocabulary, e.g. Renovate's `rebase`
|
|
|
86
100
|
`dependency-trivial` if present.
|
|
87
101
|
|
|
88
102
|
STEP 3 — Act on the classification.
|
|
89
|
-
- If **FUNCTIONAL**: do NOT merge
|
|
90
|
-
comment (via `github_add_issue_comment`)
|
|
91
|
-
warrants a human review before merging.
|
|
92
|
-
already commented on this PR.
|
|
103
|
+
- If **FUNCTIONAL**: do NOT merge and do NOT enable auto-merge — the landing
|
|
104
|
+
decision is a human's. Post a short comment (via `github_add_issue_comment`)
|
|
105
|
+
summarising what changed and why it warrants a human review before merging.
|
|
106
|
+
Skip the comment if you have clearly already commented on this PR.
|
|
107
|
+
|
|
108
|
+
Then handle the branch **separately**, because branch hygiene is not a merge
|
|
109
|
+
decision (see the two-decisions note at the top). If the `mergeable_state` you
|
|
110
|
+
read in STEP 1e is `behind` or `dirty` AND the PR author is `dependabot[bot]`
|
|
111
|
+
or `renovate[bot]`, still ask that bot to regenerate its own branch, exactly as
|
|
112
|
+
the TRIVIAL path does below — `@dependabot rebase` (`behind`) /
|
|
113
|
+
`@dependabot recreate` (`dirty`), or Renovate's `rebase` label. Do NOT enable
|
|
114
|
+
auto-merge afterwards; that is the part reserved for TRIVIAL. Two rules:
|
|
115
|
+
- **At most two comments, ever.** A Dependabot command must be its own comment
|
|
116
|
+
body with no prose around it, so it can't be merged into the review summary:
|
|
117
|
+
post the summary first, then the bare `@dependabot recreate` /
|
|
118
|
+
`@dependabot rebase`. That is the maximum — never add a third. (Renovate
|
|
119
|
+
needs no second comment at all: the `rebase` label carries the request, so
|
|
120
|
+
just mention it in the summary.)
|
|
121
|
+
- **Don't repeat it.** This branch re-runs on every check-pass and on the daily
|
|
122
|
+
cron. Skip the request when you can see an equivalent one already on the PR
|
|
123
|
+
and the branch hasn't been regenerated since, or when Renovate's `rebase`
|
|
124
|
+
label is already applied. When in doubt, stay silent — a stale conflicted
|
|
125
|
+
branch is better than a comment loop.
|
|
126
|
+
|
|
127
|
+
For any other author (not Dependabot/Renovate), do NOT nudge a bot: just note
|
|
128
|
+
in your review comment that the branch is behind/conflicted and needs a manual
|
|
129
|
+
rebase.
|
|
93
130
|
- If **TRIVIAL**: land it, or move it toward landing, based on the
|
|
94
131
|
`mergeable_state` you read in STEP 1e.
|
|
95
132
|
|
|
@@ -168,10 +205,15 @@ justification, and whether you enabled auto-merge, merged, requested a rebase, o
|
|
|
168
205
|
left it for a human.
|
|
169
206
|
|
|
170
207
|
Then, as the FINAL line of your response, emit this machine-readable completion
|
|
171
|
-
marker — ALWAYS.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
208
|
+
marker — ALWAYS. Pick the `action` that describes what you actually did:
|
|
209
|
+
- `rebase` — TRIVIAL: you asked the bot to rebase/recreate AND enabled auto-merge
|
|
210
|
+
to land it once green.
|
|
211
|
+
- `rebase-and-human` — FUNCTIONAL: you asked the bot to rebase/recreate but left
|
|
212
|
+
the merge decision to a human (no auto-merge). This is the conflicted
|
|
213
|
+
major-bump case.
|
|
214
|
+
- `comment` — you left a review/nudge comment and took no branch action.
|
|
215
|
+
|
|
216
|
+
ASSESSMENT_COMPLETE: pr={{prNumber}} verdict=<TRIVIAL|FUNCTIONAL> action=<automerge|merge|rebase|rebase-and-human|comment|already-handled>
|
|
175
217
|
|
|
176
218
|
The run is recorded as FAILED if this marker is missing — deliberately: a run
|
|
177
219
|
that ends without it did not finish its work.
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
apiVersion: apps/v1
|
|
2
|
-
kind: Deployment
|
|
3
|
-
metadata:
|
|
4
|
-
name: lastlight
|
|
5
|
-
namespace: lastlight
|
|
6
|
-
labels: { app: lastlight }
|
|
7
|
-
spec:
|
|
8
|
-
replicas: 1
|
|
9
|
-
strategy: { type: Recreate } # single embedded-SQLite writer on an RWO PVC
|
|
10
|
-
selector:
|
|
11
|
-
matchLabels: { app: lastlight }
|
|
12
|
-
template:
|
|
13
|
-
metadata:
|
|
14
|
-
labels: { app: lastlight }
|
|
15
|
-
spec:
|
|
16
|
-
containers:
|
|
17
|
-
- name: agent
|
|
18
|
-
# EDIT: pin to a release tag, e.g. :v0.21.8, once you cut a deploy.
|
|
19
|
-
image: ghcr.io/nearform/lastlight-agent-qemu:latest
|
|
20
|
-
# No runAsUser/runAsNonRoot — the entrypoint starts as root then
|
|
21
|
-
# `exec gosu lastlight` (UID 10001). SYS_RESOURCE is the one added
|
|
22
|
-
# capability gondolin's QEMU needs; still no privileged:true / hostPath.
|
|
23
|
-
securityContext:
|
|
24
|
-
capabilities:
|
|
25
|
-
add: ["SYS_RESOURCE"]
|
|
26
|
-
ports:
|
|
27
|
-
- { name: http, containerPort: 8644 }
|
|
28
|
-
env:
|
|
29
|
-
- { name: LASTLIGHT_OVERLAY_DIR, value: /app/instance }
|
|
30
|
-
- { name: STATE_DIR, value: /app/data }
|
|
31
|
-
# Persist gondolin's downloaded guest VM image on the PVC
|
|
32
|
-
# ($HOME/.cache/agentic-pi/images) so it survives restarts.
|
|
33
|
-
- { name: HOME, value: /app/data/home }
|
|
34
|
-
resources:
|
|
35
|
-
requests:
|
|
36
|
-
cpu: "500m"
|
|
37
|
-
memory: 1Gi
|
|
38
|
-
limits:
|
|
39
|
-
cpu: "4"
|
|
40
|
-
memory: 6Gi
|
|
41
|
-
devic.es/kvm: "1" # unprivileged /dev/kvm via the device plugin
|
|
42
|
-
volumeMounts:
|
|
43
|
-
- { name: data, mountPath: /app/data }
|
|
44
|
-
- { name: secrets, mountPath: /app/instance/secrets, readOnly: true }
|
|
45
|
-
- { name: config, mountPath: /app/instance/config.yaml, subPath: config.yaml, readOnly: true }
|
|
46
|
-
startupProbe: # first boot downloads the guest image — be patient
|
|
47
|
-
httpGet: { path: /health, port: 8644 }
|
|
48
|
-
periodSeconds: 10
|
|
49
|
-
failureThreshold: 60 # up to 10 min
|
|
50
|
-
readinessProbe:
|
|
51
|
-
httpGet: { path: /health, port: 8644 }
|
|
52
|
-
periodSeconds: 15
|
|
53
|
-
livenessProbe:
|
|
54
|
-
httpGet: { path: /health, port: 8644 }
|
|
55
|
-
periodSeconds: 30
|
|
56
|
-
failureThreshold: 4
|
|
57
|
-
volumes:
|
|
58
|
-
- name: data
|
|
59
|
-
persistentVolumeClaim: { claimName: lastlight-data }
|
|
60
|
-
- name: secrets
|
|
61
|
-
secret: { secretName: lastlight-secrets }
|
|
62
|
-
- name: config
|
|
63
|
-
configMap: { name: lastlight-config }
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# Exposes /dev/kvm to unprivileged pods as the schedulable resource
|
|
2
|
-
# `devic.es/kvm`, so the harness can run gondolin QEMU micro-VMs without being
|
|
3
|
-
# privileged. Talos/siderolabs-recommended pattern. This DaemonSet is the only
|
|
4
|
-
# privileged component in this example.
|
|
5
|
-
apiVersion: apps/v1
|
|
6
|
-
kind: DaemonSet
|
|
7
|
-
metadata:
|
|
8
|
-
name: generic-device-plugin
|
|
9
|
-
namespace: kube-system
|
|
10
|
-
labels:
|
|
11
|
-
app.kubernetes.io/name: generic-device-plugin
|
|
12
|
-
spec:
|
|
13
|
-
selector:
|
|
14
|
-
matchLabels:
|
|
15
|
-
app.kubernetes.io/name: generic-device-plugin
|
|
16
|
-
template:
|
|
17
|
-
metadata:
|
|
18
|
-
labels:
|
|
19
|
-
app.kubernetes.io/name: generic-device-plugin
|
|
20
|
-
spec:
|
|
21
|
-
priorityClassName: system-node-critical
|
|
22
|
-
tolerations:
|
|
23
|
-
- operator: "Exists"
|
|
24
|
-
effect: "NoExecute"
|
|
25
|
-
- operator: "Exists"
|
|
26
|
-
effect: "NoSchedule"
|
|
27
|
-
containers:
|
|
28
|
-
- name: generic-device-plugin
|
|
29
|
-
image: squat/generic-device-plugin:0.2.0
|
|
30
|
-
args:
|
|
31
|
-
- --device
|
|
32
|
-
- |
|
|
33
|
-
name: kvm
|
|
34
|
-
groups:
|
|
35
|
-
- count: 1000
|
|
36
|
-
paths:
|
|
37
|
-
- path: /dev/kvm
|
|
38
|
-
resources:
|
|
39
|
-
requests:
|
|
40
|
-
cpu: 50m
|
|
41
|
-
memory: 10Mi
|
|
42
|
-
limits:
|
|
43
|
-
cpu: 50m
|
|
44
|
-
memory: 20Mi
|
|
45
|
-
ports:
|
|
46
|
-
- containerPort: 8080
|
|
47
|
-
name: http
|
|
48
|
-
securityContext:
|
|
49
|
-
privileged: true
|
|
50
|
-
volumeMounts:
|
|
51
|
-
- name: device-plugin
|
|
52
|
-
mountPath: /var/lib/kubelet/device-plugins
|
|
53
|
-
- name: dev
|
|
54
|
-
mountPath: /dev
|
|
55
|
-
volumes:
|
|
56
|
-
- name: device-plugin
|
|
57
|
-
hostPath:
|
|
58
|
-
path: /var/lib/kubelet/device-plugins
|
|
59
|
-
- name: dev
|
|
60
|
-
hostPath:
|
|
61
|
-
path: /dev
|
|
62
|
-
updateStrategy:
|
|
63
|
-
type: RollingUpdate
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
apiVersion: v1
|
|
2
|
-
kind: Namespace
|
|
3
|
-
metadata:
|
|
4
|
-
name: lastlight
|
|
5
|
-
labels:
|
|
6
|
-
# gondolin's QEMU needs the SYS_RESOURCE capability, which exceeds the
|
|
7
|
-
# cluster-default "baseline" PSA — so this namespace runs at "privileged".
|
|
8
|
-
# The pod itself is NOT privileged: one added capability + the KVM device,
|
|
9
|
-
# no privileged:true, no hostPath, no host namespaces.
|
|
10
|
-
pod-security.kubernetes.io/enforce: privileged
|
package/deploy/k8s/pvc.yaml
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
apiVersion: v1
|
|
2
|
-
kind: PersistentVolumeClaim
|
|
3
|
-
metadata:
|
|
4
|
-
name: lastlight-data
|
|
5
|
-
namespace: lastlight
|
|
6
|
-
spec:
|
|
7
|
-
accessModes: ["ReadWriteOnce"] # single embedded-SQLite writer
|
|
8
|
-
resources:
|
|
9
|
-
requests:
|
|
10
|
-
storage: 20Gi
|
|
11
|
-
# EDIT: a local/block StorageClass so SQLite file locking is safe (not NFS).
|
|
12
|
-
# Leaving this unset uses the cluster default StorageClass.
|
|
13
|
-
# storageClassName: your-block-storage-class
|