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.
Files changed (150) hide show
  1. package/deploy/k8s/README.md +111 -34
  2. package/deploy/k8s/architecture.md +199 -0
  3. package/deploy/k8s/configmap.yaml +14 -3
  4. package/deploy/k8s/harness-deployment.yaml +111 -0
  5. package/deploy/k8s/kustomization.yaml +10 -8
  6. package/deploy/k8s/sandbox-namespace.yaml +14 -0
  7. package/deploy/k8s/sandbox-quota.yaml +37 -0
  8. package/deploy/k8s/sandbox-rbac.yaml +60 -0
  9. package/dist/admin/routes.js +66 -10
  10. package/dist/admin/routes.js.map +1 -1
  11. package/dist/config/config.d.ts +36 -0
  12. package/dist/config/config.js +101 -3
  13. package/dist/config/config.js.map +1 -1
  14. package/dist/cron/review-discovery.d.ts +54 -0
  15. package/dist/cron/review-discovery.js +70 -0
  16. package/dist/cron/review-discovery.js.map +1 -0
  17. package/dist/engine/executors/orchestrator.js +124 -58
  18. package/dist/engine/executors/orchestrator.js.map +1 -1
  19. package/dist/engine/github/github.d.ts +8 -0
  20. package/dist/engine/github/github.js +14 -0
  21. package/dist/engine/github/github.js.map +1 -1
  22. package/dist/engine/github/profiles.d.ts +12 -1
  23. package/dist/engine/github/profiles.js +33 -1
  24. package/dist/engine/github/profiles.js.map +1 -1
  25. package/dist/index.js +55 -14
  26. package/dist/index.js.map +1 -1
  27. package/dist/sandbox/artifact-backend.d.ts +40 -0
  28. package/dist/sandbox/artifact-backend.js +67 -0
  29. package/dist/sandbox/artifact-backend.js.map +1 -0
  30. package/dist/sandbox/artifact-store.d.ts +55 -0
  31. package/dist/sandbox/artifact-store.js +203 -0
  32. package/dist/sandbox/artifact-store.js.map +1 -0
  33. package/dist/sandbox/docker.d.ts +2 -1
  34. package/dist/sandbox/docker.js +3 -3
  35. package/dist/sandbox/docker.js.map +1 -1
  36. package/dist/sandbox/k8s/agent-context-registry.d.ts +25 -0
  37. package/dist/sandbox/k8s/agent-context-registry.js +45 -0
  38. package/dist/sandbox/k8s/agent-context-registry.js.map +1 -0
  39. package/dist/sandbox/k8s/agent-context-route.d.ts +13 -0
  40. package/dist/sandbox/k8s/agent-context-route.js +21 -0
  41. package/dist/sandbox/k8s/agent-context-route.js.map +1 -0
  42. package/dist/sandbox/k8s/artifact-upload-route.d.ts +12 -0
  43. package/dist/sandbox/k8s/artifact-upload-route.js +40 -0
  44. package/dist/sandbox/k8s/artifact-upload-route.js.map +1 -0
  45. package/dist/sandbox/k8s/client.d.ts +22 -0
  46. package/dist/sandbox/k8s/client.js +35 -0
  47. package/dist/sandbox/k8s/client.js.map +1 -0
  48. package/dist/sandbox/k8s/egress-apply.d.ts +14 -0
  49. package/dist/sandbox/k8s/egress-apply.js +44 -0
  50. package/dist/sandbox/k8s/egress-apply.js.map +1 -0
  51. package/dist/sandbox/k8s/egress-ensurer.d.ts +37 -0
  52. package/dist/sandbox/k8s/egress-ensurer.js +54 -0
  53. package/dist/sandbox/k8s/egress-ensurer.js.map +1 -0
  54. package/dist/sandbox/k8s/egress-policy.d.ts +112 -0
  55. package/dist/sandbox/k8s/egress-policy.js +118 -0
  56. package/dist/sandbox/k8s/egress-policy.js.map +1 -0
  57. package/dist/sandbox/k8s/init-agent-context.d.ts +20 -0
  58. package/dist/sandbox/k8s/init-agent-context.js +35 -0
  59. package/dist/sandbox/k8s/init-agent-context.js.map +1 -0
  60. package/dist/sandbox/k8s/init-clone.d.ts +53 -0
  61. package/dist/sandbox/k8s/init-clone.js +114 -0
  62. package/dist/sandbox/k8s/init-clone.js.map +1 -0
  63. package/dist/sandbox/k8s/init-skills.d.ts +13 -0
  64. package/dist/sandbox/k8s/init-skills.js +28 -0
  65. package/dist/sandbox/k8s/init-skills.js.map +1 -0
  66. package/dist/sandbox/k8s/kubernetes-sandbox.d.ts +179 -0
  67. package/dist/sandbox/k8s/kubernetes-sandbox.js +418 -0
  68. package/dist/sandbox/k8s/kubernetes-sandbox.js.map +1 -0
  69. package/dist/sandbox/k8s/log-stream.d.ts +4 -0
  70. package/dist/sandbox/k8s/log-stream.js +43 -0
  71. package/dist/sandbox/k8s/log-stream.js.map +1 -0
  72. package/dist/sandbox/k8s/naming.d.ts +19 -0
  73. package/dist/sandbox/k8s/naming.js +35 -0
  74. package/dist/sandbox/k8s/naming.js.map +1 -0
  75. package/dist/sandbox/k8s/pod-lifecycle.d.ts +40 -0
  76. package/dist/sandbox/k8s/pod-lifecycle.js +151 -0
  77. package/dist/sandbox/k8s/pod-lifecycle.js.map +1 -0
  78. package/dist/sandbox/k8s/pod-status.d.ts +46 -0
  79. package/dist/sandbox/k8s/pod-status.js +83 -0
  80. package/dist/sandbox/k8s/pod-status.js.map +1 -0
  81. package/dist/sandbox/k8s/pod.d.ts +79 -0
  82. package/dist/sandbox/k8s/pod.js +115 -0
  83. package/dist/sandbox/k8s/pod.js.map +1 -0
  84. package/dist/sandbox/k8s/pvc.d.ts +20 -0
  85. package/dist/sandbox/k8s/pvc.js +26 -0
  86. package/dist/sandbox/k8s/pvc.js.map +1 -0
  87. package/dist/sandbox/k8s/quota.d.ts +34 -0
  88. package/dist/sandbox/k8s/quota.js +52 -0
  89. package/dist/sandbox/k8s/quota.js.map +1 -0
  90. package/dist/sandbox/k8s/reclaim.d.ts +50 -0
  91. package/dist/sandbox/k8s/reclaim.js +141 -0
  92. package/dist/sandbox/k8s/reclaim.js.map +1 -0
  93. package/dist/sandbox/k8s/resource-name.d.ts +33 -0
  94. package/dist/sandbox/k8s/resource-name.js +49 -0
  95. package/dist/sandbox/k8s/resource-name.js.map +1 -0
  96. package/dist/sandbox/k8s/run-agent-script.d.ts +60 -0
  97. package/dist/sandbox/k8s/run-agent-script.js +48 -0
  98. package/dist/sandbox/k8s/run-agent-script.js.map +1 -0
  99. package/dist/sandbox/k8s/run-id.d.ts +23 -0
  100. package/dist/sandbox/k8s/run-id.js +32 -0
  101. package/dist/sandbox/k8s/run-id.js.map +1 -0
  102. package/dist/sandbox/k8s/run-secrets.d.ts +75 -0
  103. package/dist/sandbox/k8s/run-secrets.js +115 -0
  104. package/dist/sandbox/k8s/run-secrets.js.map +1 -0
  105. package/dist/sandbox/k8s/secret.d.ts +20 -0
  106. package/dist/sandbox/k8s/secret.js +38 -0
  107. package/dist/sandbox/k8s/secret.js.map +1 -0
  108. package/dist/sandbox/k8s/skill-bundle-route.d.ts +10 -0
  109. package/dist/sandbox/k8s/skill-bundle-route.js +18 -0
  110. package/dist/sandbox/k8s/skill-bundle-route.js.map +1 -0
  111. package/dist/sandbox/k8s/skill-bundle.d.ts +36 -0
  112. package/dist/sandbox/k8s/skill-bundle.js +85 -0
  113. package/dist/sandbox/k8s/skill-bundle.js.map +1 -0
  114. package/dist/sandbox/k8s/sweep.d.ts +47 -0
  115. package/dist/sandbox/k8s/sweep.js +29 -0
  116. package/dist/sandbox/k8s/sweep.js.map +1 -0
  117. package/dist/sandbox/k8s/workspace-provisioner.d.ts +51 -0
  118. package/dist/sandbox/k8s/workspace-provisioner.js +64 -0
  119. package/dist/sandbox/k8s/workspace-provisioner.js.map +1 -0
  120. package/dist/sandbox/sandbox.d.ts +20 -1
  121. package/dist/sandbox/sandbox.js +22 -1
  122. package/dist/sandbox/sandbox.js.map +1 -1
  123. package/dist/state/workflow-run-store.d.ts +11 -0
  124. package/dist/state/workflow-run-store.js +19 -0
  125. package/dist/state/workflow-run-store.js.map +1 -1
  126. package/dist/workflows/admission.d.ts +19 -0
  127. package/dist/workflows/admission.js +81 -13
  128. package/dist/workflows/admission.js.map +1 -1
  129. package/dist/workflows/handlers/post-review.d.ts +21 -0
  130. package/dist/workflows/handlers/post-review.js +56 -13
  131. package/dist/workflows/handlers/post-review.js.map +1 -1
  132. package/dist/workflows/resume.js +6 -0
  133. package/dist/workflows/resume.js.map +1 -1
  134. package/dist/workflows/runner.d.ts +11 -2
  135. package/dist/workflows/runner.js +73 -15
  136. package/dist/workflows/runner.js.map +1 -1
  137. package/dist/workflows/simple.d.ts +13 -1
  138. package/dist/workflows/simple.js +46 -4
  139. package/dist/workflows/simple.js.map +1 -1
  140. package/package.json +21 -20
  141. package/skills/issue-triage/SKILL.md +17 -0
  142. package/workflows/cron-review.yaml +14 -1
  143. package/workflows/dependabot-pr-merge.yaml +14 -9
  144. package/workflows/issue-triage.yaml +6 -0
  145. package/workflows/prompts/dependabot-pr-merge.md +53 -11
  146. package/deploy/k8s/deployment.yaml +0 -63
  147. package/deploy/k8s/generic-device-plugin.yaml +0 -63
  148. package/deploy/k8s/namespace.yaml +0 -10
  149. package/deploy/k8s/pvc.yaml +0 -13
  150. 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
- mode: scan
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 trivial bump is merely behind the base branch or has a
7
- lockfile conflict, it asks the bot that opened the PR to rebase/recreate its
8
- own branch (@dependabot rebase|recreate, or Renovate's rebase label) and enables
9
- auto-merge to land it once green — it never pushes or rebases itself. The
10
- companion to dependabot-ci-fix: that one repairs a RED bump and pushes a fix;
11
- this one merges a GREEN one that needs no fix at all.
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
- # trivial PR that is `behind`/`dirty` is nudged to rebase via the bot's own
50
- # command (@dependabot rebase|recreate) or Renovate's rebase label, with
51
- # auto-merge enabled to land it once GitHub re-runs the checks green. Because
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 trivial PR
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, then enable auto-merge so GitHub lands it once it goes
10
- green (see STEP 3). You never rebase, merge from base, or push yourself.
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, and do NOT request a rebase. Post a short
90
- comment (via `github_add_issue_comment`) summarising what changed and why it
91
- warrants a human review before merging. Skip the comment if you have clearly
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. Use `action=rebase` when you asked the bot to rebase/recreate
172
- its branch (and enabled auto-merge to land it once green):
173
-
174
- ASSESSMENT_COMPLETE: pr={{prNumber}} verdict=<TRIVIAL|FUNCTIONAL> action=<automerge|merge|rebase|comment|already-handled>
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
@@ -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
@@ -1,12 +0,0 @@
1
- apiVersion: v1
2
- kind: Service
3
- metadata:
4
- name: lastlight
5
- namespace: lastlight
6
- spec:
7
- selector:
8
- app: lastlight
9
- ports:
10
- - name: http
11
- port: 8644
12
- targetPort: 8644