Repository navigation
feat(spec): add helm_charts to the kubernetes deploy substrate - #27
Conversation
The kustomize/helm venues install chart releases alongside the generated workload. The k8sgen emitter translates each entry into a kustomize `helmCharts:` overlay entry (chart→name, release→releaseName, values_files→valuesFile); the vm/pod/local venues install the same releases via `step:helm-release`. Field set confirmed by the Unit 1 schema spike. Assisted-by: Claude Code DeepSeek V4 Flash (fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: code/config — a spec-repo schema/wire-type addition ( Head SHA validated: What I verified independently (PASS)
Blocking findings
Comments consideredNone — the PR carries no comments and no reviews. Cross-PR interactions considered
DecisionFAIL — not merged. The change itself is technically sound (SDD-clean, tests green, correctly placed), but the PR is not landable as submitted: it is missing the required CHANGELOG entry, the body does not satisfy the mandatory template (no change class, no pasted R10 output, no rule-compliance section), the What the author must fix:
Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
The spec repo convention requires a CHANGELOG/<CalVer>.md per landing. Placeholder CalVer — the pr-validator finalizes it at merge. Assisted-by: Claude Code DeepSeek V4 Flash (fully tested and validated)
pr-validator — APPROVED ✅Change class: code/config — a spec-repo schema/wire-type addition ( Head SHA validated: Checklist (every rule, independently re-derived)
Comments considered
Cross-PR interactions considered
DecisionPASS. The change is SDD-clean (CUE single source, generated Go, reproducible), correctly placed (a wire shape in Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
The pr-validator finalizes the placeholder CalVer at merge time. Assisted-by: Claude Code DeepSeek V4 Flash (fully tested and validated)
pr-validator — merged ✅Merged: squash as Squash trailer proof: pre-merge parse = CalVer finalized at merge: Coordination: the consumer Assisted-by: Claude Code deepseek-v4-flash:cloud (analysed on a live system) |
…ry Unit 1) ## Summary of changes The north-star's Unit 1 gap cutover: the out-of-tree `candy/plugin-helm` owns both helm words. The **step** is a plugin-contributed `external:helm-release` install-step KIND (F3): its opaque payload is the `#HelmReleaseStep` def, carried through the InstallPlan IR and validated against the plugin's served schema; the step performs `helm upgrade --install` **IN-VENUE** against the venue's kubeconfig (`/etc/rancher/k3s/k3s.yaml` on a k3s guest) and returns a teardown ReverseOp (`helm uninstall`) the host records + replays. The **verb** is the declarative release-status assertion (the `verb:kube` analog): method + method-exclusive modifiers ride the desugared plugin input, validated against `#HelmInput`; EXEC-based — it drives the venue's helm binary over the host's live DeployExecutor reverse channel, owning no Kubernetes client library. - **`candy/plugin-helm`** (new, out-of-tree): `providers: [step:helm-release, verb:helm]`, the `#HelmReleaseStep` / `#HelmInput` CUE schemas, the in-venue `helm upgrade --install` OpExecute + the `helm uninstall` teardown ReverseOp, and the EXEC-based verb methods (release-exists / status / revision). - **`candy/helm-chart`** (new): the check-helm-vm bed's install leg — the mutating install lives in a CANDY's `run:` steps (fleet add lowers only candy plans' `run:` steps; the bed's own plan is verify-only), plus its own ADE `check:` step asserting the release exists (R3). - **`candy/k3s-kernel`** (new, `reboot: true`): the Arch cloud image boots a minimal kernel without overlayfs or iptables/netfilter — k3s's containerd and kube-proxy both fail on it. The candy installs the full distro kernel and the vm deploy's RebootStep reboots the venue mid-deploy (R1/R2 — the RCA of the two earlier FAILED check-helm-vm runs). - **`snapshotter: native`** in the k3s config.yaml render: a VM kernel is not guaranteed to support overlayfs. - **`candy/plugin-k8sgen`**: emits `deployment.kubernetes.helm_charts` into the overlay kustomization's `helmCharts:` list (chart→name, release→releaseName, values_files→valuesFile, includeCRDs: true) — the missing half the north-star calls out. - **`candy/plugin-kube/deploy.go`**: the `--enable-helm` apply path — `kubectl apply -k` cannot render a `helmCharts:` overlay (the kustomize helmCharts transformer is gated behind `--enable-helm`, which only `kubectl kustomize` accepts), so when the overlay carries helmCharts the deploy renders with `kubectl kustomize --enable-helm` and applies the stream via `kubectl apply -f -` (and the teardown deletes the same way). A genuine gap the live proof exposed. - **`charly.yml`**: the `check-helm-vm` bed (vm/helm venue) + the `check-k8s-deploy` workload member now carries `helm_charts:` (kubernetes substrate proof) + the `kd-helm-release-landed` kube: check. - **`CHANGELOG/2026.225.XXXX.md`**: the repo's every-landing CHANGELOG entry (placeholder CalVer; the pr-validator finalizes it at merge). ## Change class **code/config** — new candies (plugin-helm, helm-chart, k3s-kernel), a k8sgen emission, a deploy-substrate apply-path fix, and two beds. Touches the **kubernetes deploy substrate** (the helm_chars emission + the `--enable-helm` apply path) and the **vm substrate** (the check-helm-vm bed), so the R10 gate is both substrates' beds: `check-helm-vm` + `check-k8s-deploy`. ## How R10-tested — exact gate, commands, and pasted output - **`charly box validate`** passes; **`task cue:gen`** reproducible; plugin-helm builds (GOWORK=off); k8sgen + plugin-kube tests pass. - **R10: `charly check run check-helm-vm` PASS (steps=9)** — vm-build, vm-create, deploy-add (k3s-kernel reboot fired, node Ready, kubeconfig retrieved, the helm-chart candy's install ran during fleet add), check-live (helm status/revision + release-exists all passed), fresh update (4m19s), check-live-rebuild (37.7s), cleanup. Zero check-step failures. Proves the `step:helm-release` install + the `verb:helm` assertions end to end in the vm/helm venue. - **R10: `charly check run check-k8s-deploy` PASS** (steps=10, 743s, zero warnings) — proves the `helm_charts` kustomize emission + the `--enable-helm` apply path end to end on the kubernetes substrate: the workload member's `helm_chars:` (prometheus-pushgateway, release `web-pushgateway`, namespace `web`) is emitted as a `helmCharts:` overlay entry, rendered with `kubectl kustomize --enable-helm`, applied to the disposable k3s cluster, and asserted by the `kd-helm-release-landed` kube: check (the chart's Deployment `web-pushgateway-prometheus-pushgateway` in namespace `web`). The fresh-rebuild gate passed (`check-live-rebuild`). - **Fresh rebuild:** both beds ran on a fresh `charly update` of their deploys (the R10 fresh-rebuild gate), at zero check-step warnings. - **Concurrency:** `N/A` — no shared-state path touched. ## Attribution tier **fully tested and validated** — both changed runtime paths executed live against fresh rebuilds of `disposable: true` targets: the `step:helm-release` install + `verb:helm` assertions (check-helm-vm) and the `helm_charts` kustomize emission + `--enable-helm` apply path (check-k8s-deploy). ## Harness rulebook compliance — state HOW each is satisfied (or `N/A — <reason>`) - **R0 skills:** `/charly-internals:plugin` (out-of-tree plugin authoring), `/charly-check:check` (R10 bed gate), `/charly-internals:go` (SDD), `/charly-internals:git-workflow` loaded and honored. - **R1 RCA + zero warnings:** the two earlier FAILED `check-helm-vm` runs were RCA'd per-run. **2026.225.1721:** the k3s server did not come up — the host-side `kube:` steps failed with `apiserver not ready` and the k3s-server candy's in-venue checks warned `open /etc/rancher/k3s/config.yaml: permission denied`; the RCA is the Arch cloud image's minimal kernel (the system upgrade installs the full `linux` package but the running kernel stays minimal until a reboot, so k3s's containerd/kube-proxy fail) — fixed via `candy/k3s-kernel` (`reboot: true`) + `snapshotter: native`; the `ch-helm-binary` assertion also expected helm v3 but the venue had v4.2.2 — corrected to v4. **2026.225.1748:** the cluster came UP (node Ready, addons Ready) but the `ch-helm-release-install` step was SKIPPED — the install was authored in the bed's own plan, and a bed's plan is verify-only (mutating steps are skipped) — so the release was never installed and the three helm verb checks failed with `release web-pushgateway not found in namespace web`; fixed by moving the install into the `candy/helm-chart` candy's `run:` steps (fleet add lowers candy `run:` steps). The `--enable-helm` apply-path gap surfaced by the check-k8s-deploy live proof is fixed in `candy/plugin-kube/deploy.go`. Both beds ran at zero warnings. - **R2 no out-of-scope:** the k3s-kernel fix and the `--enable-helm` fix landed in the same cutover; nothing parked. - **R3 no duplication:** the `#HelmChart` def is the single source for both the kustomize `helmCharts:` emission and the `step:helm-release` install; the helm client is the existing `candy/kubernetes` toolchain (no dedicated `candy/helm`); the `--enable-helm` render reuses the same `runKubectl` seam. - **R4 no workaround:** no sleeps, no ad-hoc `helm`/`kubectl` commands against managed resources; the `--enable-helm` render is the product fix, not a shim. - **R5 hard cutover + grep:** no removed identifiers; no transitional content. - **R6 git safety:** no force-push; PR-only landing via a fresh independent pr-validator. - **R7 runtime gate:** both beds ran live (see How R10-tested). - **R8 artifact invariants:** the k8sgen emission is asserted by `TestGenerateTree_HelmCharts`; the `--enable-helm` detection by `TestOverlayHasHelmCharts`. - **R9 binary == source + deps:** check-k8s-deploy ran against the worktree-local `bin/charly` (v2026.225.1902, built from 5ebffa3 + the uncommitted `--enable-helm` apply path that 1dff11b then committed — the binary's runtime behavior matches the final code). check-helm-vm ran at 18:39 UTC against the worktree-local binary current at that time, built from the pre-commit working tree that became 5ebffa3 (the helm words were in the working tree, uncommitted). - **R10 disposable + coverage:** both beds ran on `disposable: true` targets at zero warnings; the coverage fails without the change (the `kd-helm-release-landed` check fails without the `--enable-helm` apply path; the check-helm-vm helm assertions fail without the install). - **RDD / ADE / SDD:** SDD — the `#HelmReleaseStep` / `#HelmInput` / `#HelmChart` field sets were confirmed by the Unit 1 schema spike; `task cue:gen` reproducible. ADE — every new candy ships a non-empty `description:` + a deterministic `check:` step (`charly box validate` enforces it). - **Hard cutover:** one atomic cutover; no Phase-2/TODO. - **Kernel/plugin boundary law:** zero helm knowledge enters the kernel — both words are out-of-process plugin capabilities; the k8sgen emission is the compiled-in generator's job, the apply path is the out-of-process deploy substrate's job. - **Disposable-only autonomy:** both beds ran on `disposable: true` targets. - **Clean architecture + Go gates:** `gofmt -l .` empty, `golangci-lint run ./...` 0 issues, `go vet` clean, `go test ./...` green. - **CHANGELOG:** `CHANGELOG/2026.225.XXXX.md` staged (placeholder CalVer — the pr-validator finalizes it). ## Submodule PRs - spec: opencharly/spec#27 (`helm_charts` + `#HelmChart`) — the gitlink points at the validated spec#27 head `ab5eab1` (schema + CHANGELOG, `helm_charts` at `schema/deploy.cue:317`). `ab5eab1` is a DELETED-BRANCH commit: the spec#27 PR branch was deleted after the squash-merge, so the commit is not on spec main and is reachable only by SHA (fetchable today). The merged head `4cff4d0` additionally carries the nFPM Phase 0a schema (spec#25), which the sdk at `e6950fa` does not yet adopt — the in-flight nFPM sdk adoption (sdk → `1f19285` + the 3-package main-repo code changes) moves the pointer to `4cff4d0`; the `helm_charts` field set is byte-identical between the two heads, so this cutover's consumer code is unaffected by the move. - docs: opencharly/docs#50 (regenerated plugin-helm pages) — the gitlink is updated to the merged head in this PR. Assisted-by: Claude Code DeepSeek V4 Flash (fully tested and validated)
Summary of changes
Adds
helm_chartsto the#KubernetesDeploydef (Factory Unit 1 — the helm words cutover). The kustomize/helm venues install chart releases alongside the generated workload; the k8sgen emitter translates each entry into a kustomizehelmCharts:overlay entry (chart→name, release→releaseName, values_files→valuesFile); the vm/pod/local venues install the same releases viastep:helm-release. Field set confirmed by the Unit 1 schema spike.schema/deploy.cue:helm_charts?: [...#HelmChart]on#KubernetesDeploy+ the#HelmChartdef (repo?,chart!,version?,release!,namespace?,values_files?)spec/cue_types_gen.go: regenerated types (Helm_charts []HelmChartonKubernetesDeploy)CHANGELOG/2026.225.XXXX.md: the spec repo's every-landing CHANGELOG entry (placeholder CalVer; the pr-validator finalizes it at merge)Change class
code/config — spec-repo schema/wire-type addition. Cross-repo producer for
opencharly/charly#265(the consumer that adds the k8sgen emission + the--enable-helmapply path + the beds). Touches the kubernetes deploy substrate (the field is consumed by the k8sgen emitter'shelmCharts:overlay emission and the deploy substrate's apply path), so the R10 gate is the kubernetes substrate's bed:check-k8s-deploy.How R10-tested — exact gate, commands, and pasted output
task cue:genreproducible) +go test ./...+ the consumer's live coverage of the field on the kubernetes substrate's bed.check-k8s-deploybed's workload member now carrieshelm_charts:(prometheus-pushgateway, releaseweb-pushgateway, namespaceweb). The k8sgen emitter translates it into a kustomizehelmCharts:overlay entry; the deploy substrate renders it withkubectl kustomize --enable-helm(the kustomize helmCharts transformer is gated behind--enable-helm, whichkubectl apply -kcannot pass — a genuine gap the live proof exposed and the main-repo cutover closes incandy/plugin-kube/deploy.go) and applies the rendered stream. The bed'skd-helm-release-landedkube: check asserts the chart's Deployment object (web-pushgateway-prometheus-pushgatewayin namespaceweb) landed on the cluster.charly check run check-k8s-deployPASS (steps=10, 743s, zero warnings) — the consumer's bed ran live against the spec submodule at this head: the workload member'shelm_chars:(prometheus-pushgateway, releaseweb-pushgateway, namespaceweb) was emitted as a kustomizehelmCharts:overlay entry, rendered withkubectl kustomize --enable-helm, applied to a real disposable k3s cluster, and asserted by thekd-helm-release-landedkube: check (the chart's Deploymentweb-pushgateway-prometheus-pushgatewayin namespaceweb). The fresh-rebuild gate passed (check-live-rebuild).check-helm-vmbed (PASS, steps=9) — the samehelm_chartsfield set consumed viastep:helm-release.charly updateof the check-k8s-deploy deploy (the R10 fresh-rebuild gate), at zero check-step warnings.helm_chartsfield ran live: the k8sgen emitter generated thehelmCharts:overlay entry and the deploy substrate applied the rendered chart to a real disposable k3s cluster, asserted by thekd-helm-release-landedkube: check.N/A— no shared-state path touched.SDD gate (re-run, not trusted):
Consumer coverage of the field (unit + live):
Attribution tier
fully tested and validated — the changed path (the
helm_chartsfield on#KubernetesDeploy) executed live: the k8sgen emitter generated thehelmCharts:overlay entry and the deploy substrate applied the rendered chart to a real disposable k3s cluster, asserted by thekd-helm-release-landedkube: check. The commit trailer carries the matchingAssisted-by: Claude Code DeepSeek V4 Flash (fully tested and validated).Harness rulebook compliance — state HOW each is satisfied (or
N/A — <reason>)/charly-internals:go(SDD recipe),/charly-internals:plugin(CUE-schema contract),/charly-check:check(R10 bed gate),/charly-internals:git-workflowloaded and honored.check-helm-vmruns (2026.225.1721, 2026.225.1748) were RCA'd in the main-repo cutover (feat(helm): add the helm words — step:helm-release + verb:helm (Factory Unit 1) charly#265): the Arch cloud image boots a minimal kernel without overlayfs/iptables-netfilter, so k3s's containerd and kube-proxy both fail; fixed via the newcandy/k3s-kernel(reboot: true) +snapshotter: nativein the k3s config render. The spec change (thehelm_chartsschema) was not the cause; the fix landed in the same cutover. The SDD gate ran clean (cue:gen no-op, go test green).--enable-helmapply-path gap surfaced by the live proof is fixed in the same cutover (main-repocandy/plugin-kube/deploy.go); the CHANGELOG entry was added in the same cutover; nothing parked.#HelmChartdef is the single CUE source for both the kustomizehelmCharts:emission and thestep:helm-releaseinstall; the generated Go is the only transcription; no helm knowledge enters the kernel.helm/kubectlcommands against managed resources; the deploy substrate's--enable-helmrender is the product fix, not a shim.check-k8s-deploybed ran live (see How R10-tested); the spec repo itself has no runtime path.cue_types_gen.gois asserted by the SDD gate (cue:gen no-op).bin/charly(v2026.225.1902) with the spec submodule at this head.disposable: truetarget at zero warnings; thehelm_chartsfield is covered byTestGenerateTree_HelmCharts(the coverage that would fail without this change) AND the livekd-helm-release-landedcheck.task cue:genis reproducible. ADEN/A(no candy in this repo).N/A— spec-repo wire types, not kernel code.disposable: truetarget.gofmt -l .empty,golangci-lint run ./...0 issues,go vetclean,go test ./...green.CHANGELOG/2026.225.XXXX.mdstaged (placeholder CalVer — the pr-validator finalizes it).Assisted-by: Claude Code DeepSeek V4 Flash (fully tested and validated)