Repository navigation
fix(k8s): do not let kind inherit the kind-ci placeholder client id - #663
Merged
Merged
Conversation
--target kind and --target kind-ci share one Kind cluster, hence one moca-settings. Since settings became sticky (rossoctl#427), a kind run after a kind-ci run read the CI placeholder Iv1.k8s-smoke-unused back as if an operator had set it: the control plane came up at 1 replica with an id nobody can log in with, instead of 0 replicas and the "no client id" warning. The placeholder predates stickiness, which retroactively turned a render-time default into persisted configuration. Name the placeholder CI_CLIENT_ID and discard it on read-back when the target is not kind-ci, the same shape public_harness_url already uses to drop a stored value that no longer suits the target. kind-ci re-derives it every run, so the key stays present and non-empty (base/control-plane .yaml refs it without optional: true, and the control plane's required() rejects an empty value), the ConfigMap keeps its ten-key shape, and the settings hash is byte-identical across the change -- a kind-ci re-run still converges without rolling a pod. Fixes rossoctl#429 Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: cwiklik <[email protected]>
ingpaolodettori-dev
approved these changes
Oct 29, 2026
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
LGTM. The placeholder is dropped only on read-back and only off kind-ci. An explicit or real stored id is unaffected. kind-ci re-derives the same string, so the settings hash and convergence are unchanged. The new kind-ci → kind → kind-ci test (no reset between runs) covers both halves, and the README documents the one exception to stickiness. CI is green, including deploy-scripts-bash32 and k8s-kind-e2e.
Author: cwiklik (MEMBER — maintainer)
Areas reviewed: Shell, Docs
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit, all signed-off: yes
CI status: passing
webchang
added a commit
to webchang/moca
that referenced
this pull request
Nov 2, 2026
Takes upstream's 11 commits after 071b213: gh vendored into the sandbox images (rossoctl#661), the sandbox image pulled on every run in both VM paths (rossoctl#665) and in compose (rossoctl#664), a cached login matched by endpoint (rossoctl#667), a kind-ci fix (rossoctl#663). No conflicts. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Rong Chang <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--target kindand--target kind-cishare one Kind cluster (KIND_CLUSTER=moca) and therefore onemoca-settings. Since settings became sticky (#427), akindrun after akind-cirun read the CI placeholderIv1.k8s-smoke-unusedback as if an operator had set it: the control plane came up at 1 replica with an id nobody can log in with, instead of 0 replicas and the "no client id" warning.The placeholder (
6f3495d6) predates stickiness (d777233d), so stickiness retroactively turned a render-time default into persisted configuration. That is the bug.This takes fix (a) from the issue — never treat the placeholder as stored input.
What changed
Name the placeholder
CI_CLIENT_IDand discard it on read-back when the target is notkind-ci— the same shapepublic_harness_urlalready uses (setup.sh:1019-1026) to drop a stored value that no longer suits the current target.CLIENT_IDkind-ci, first runkind-ci, re-run (CI's second step)kindafterkind-ci''kindwith a real stored idWhy the key is still written
"Apply it at render time only" can't mean omitting or emptying the key:
base/control-plane.yaml:60-61is aconfigMapKeyRefwithoutoptional: true(unlike its neighbours) — an absent key givesCreateContainerConfigError, andpackages/supervisor/test/k8s/base-control-plane.test.ts:85-98pins that shape.required()inpackages/control-plane/src/main.ts:37-45usesif (!v), so an empty value throws exactly like an absent one.kind-cismoke execs into a running control-plane pod to mint its own token (smoke.sh:230-237).So
kind-cikeeps re-deriving a non-empty placeholder every run. The ConfigMap keeps its ten-key shape, and the settings hash is byte-identical across this change, sok8s-e2e.yml's secondkind-cirun still converges without rolling a pod (README: "a re-run with nothing changed converges without restarting any pod").Verification
id=Iv1.k8s-smoke-unused replicas=1, no warning →id='' replicas=0, warning printedsetup.shat exactlykind inherited the kind-ci placeholder client id (#429); passes with the fixdeploy/k8s/tests/setup.test.shceb7a64…)Iv1.real→ 1 replica, unaffectedmake test-deploy-bash32(#440)/bin/bash3.2.57, 138 oks, no skipsmake test-deploybuild-snapshot.test.shfails — confirmed identical with these changes stashed (needs microVM tooling absent on macOS; CI runs it on ubuntu)configMapKeyReftest-x -S warning,/bin/bash -n, prettier, doc linksThe live
kind-cipath is covered byk8s-e2e.ymlon this PR.Also
deploy/k8s/README.mdstated inputs are sticky without exception; it now documents this one, both in the sticky-inputs list and under the CI variant.Fixes #429
Assisted-By: Claude Code