Repository navigation
fix(check): align check-k8s-deploy's cluster context with the derived domain - #654
Conversation
… domain The `check-k8s-deploy` group bed's `check-k8s-deploy-cluster-ctx` template pinned `kubeconfig_context: vm-check-k8s-deploy-cluster`, but the group's cluster member is the group ROOT's own `vm:` body — its per-deploy domain identity is `vm-<group>` = `vm-check-k8s-deploy`. So the workload member's `kubectl apply -k` failed with `context "vm-check-k8s-deploy-cluster" does not exist`, and the group bed's `bring-up-members` step failed. There is no `check-k8s-deploy-cluster` member (the name appears only in stale comments; the vm is the group root). Fix the context pin to the domain the cluster member actually registers, and sweep the stale `-cluster` comment references. R10: `charly check run check-k8s-deploy` (disposable: true libvirt k3s VM, plugin-kube via CHARLY_REPO_OVERRIDE) — PASS (steps=15), including [check-live] + [check-live-rebuild]. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — BLOCKHead SHA: Change class: config (a bed's Blocks
Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
Validator round 2 on the context fix: the body's RCA says there is no `check-k8s-deploy-cluster` member (the control plane is the group root's own `vm:`), yet the diff left bare `check-k8s-deploy-cluster` member references in the comments / group description. Sweep them to the group-root wording (the `-ctx` template name is legitimate and stays). No behavior change (comments/description only); the pin fix in the base commit is what the live bed proves. Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)
Review — PASSHead SHA: Security screen: PASS — config/comment-only diff to Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
Fixes the
check-k8s-deploygroup bed's failingbring-up-membersstep (filed as #653 during the plugin-kube schema-261 verification). The group'scheck-k8s-deploy-cluster-ctxtemplate pinnedkubeconfig_context: vm-check-k8s-deploy-cluster, but the group's cluster member is the group ROOT's ownvm:body — there is nocheck-k8s-deploy-clustermember. The root's per-deploy domain identity isvm-<group>=vm-check-k8s-deploy, so the workload member'skubectl apply -kfailed witherror: context "vm-check-k8s-deploy-cluster" does not exist.RCA. The
-clustersuffix names a member that never existed: onorigin/main,grep -n 'check-k8s-deploy-cluster:' charly.ymlfound only stale COMMENTS, never an entity. The group authors the control plane as the rootvm:(member 1), whoseArtifactKey/domain derivesvm-check-k8s-deploy; the workload member references the ctx templatecheck-k8s-deploy-cluster-ctx(kubernetes: {from: check-k8s-deploy-cluster-ctx}). The pin and the derived domain diverged. This reproduces onorigin/main.The 1-file diff (
charly.yml), two commits:52fc30d4— thekubeconfig_contextpin corrected to the derivedvm-check-k8s-deploy, plus thevm-check-k8s-deploy-cluster-prefixed comment/example sweep;dd7d282a— validator round 2: sweep the remaining BAREcheck-k8s-deploy-clusterMEMBER references in the comments and the groupdescription:(the RCA says no such member exists — the control plane is the group root's ownvm:); the legitimate-ctxTEMPLATE name stays.grep -cE 'check-k8s-deploy-cluster([^-]|$)' charly.yml→ 0.Base
origin/maineebf2123f9; the branch head is an empty body-refresh commit.How tested
R10 — the exact bed the fix repairs, a fresh rebuild + live run on the
disposable: truelibvirt k3s VM.plugin-kubeis loaded from its own branch via the sanctionedCHARLY_REPO_OVERRIDEmechanism (orthogonal; the context fix is in this repo):The decisive
check-liveplan (thekube:probes that read the applied Deployment) is green in BOTH the initial and rebuild passes:Fail-without-the-change: on
origin/mainthe same run fails atbring-up-members:The one non-allowlisted warning in
deploy-add/update— RCA + NAMED batch (not dismissed). Raw line:summary.ymlclasses it under the plainseverity-prefixfinding (count 1 per deploy-add), NOT anyallowlisted:entry — so it is a real surviving warning, and I root-caused it rather than waving it off. Mechanism:GenerateAndStoreSecret(sdk/deploykit/secret_provision.go:63-67) generates the token and callscred.Write, which forwards toverb:credential— served out-of-process bycandy/plugin-secrets(charly/charly/credential_plugin.go'sconnectPluginByWord). This project's candy closure does not referenceplugin-secrets, so the write cannot connect; the warning is logged and the deploy continues (the token is still used in-memory, so the bed's k3s control plane comes up). It is a project-CLOSURE gap, not a plugin defect and not caused by this context fix. Filed as the named batch #655 — "VM beds warn (non-allowlisted) that K3S_CLUSTER_TOKEN cannot be persisted — plugin-secrets is absent from the bed closure" — with the mechanism + fix direction (makeplugin-secretsreachable from the bed closure). This PR's fix (the context pin) does not touch that path; #655 owns it.Project-rulebook rule-compliance
/charly-check:check,/charly-internals:git-workflow,/charly-internals:root-cause-analyzerloaded first.kubeconfig_contextpin naming a member that never existed, diverging from the root's derivedvm-check-k8s-deploydomain.kubeconfig_context); no duplicate.vm-check-k8s-deploy-clusterreference is swept (grep -c→ 0).mainand passes with the fix (both pasted).charly check run check-k8s-deployincluding[update]+[check-live-rebuild]: PASS (steps=15).disposable: true; no unrelated target mutated.Change classification
Config (a bed's
kind: kuberneteskubeconfig_contextpin) + comment sweep, no product code. Verification gate:charly check run check-k8s-deploy(disposable: true) — PASS (steps=15), fresh rebuild exercised. Attribution tier:fully tested and validated.Assisted-by: opencode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)