kube: annotations for the pods of sessions, from the configuration #95
Loading…
Reference in a new issue
No description provided.
Delete branch "pod-annotations"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
spec-bb1.42, roomcity's part, shape agreed with roomcity-b8:
[kube] pod_annotationsand[agents.<name>] pod_annotationson the Job's pod template (the agent's win by key),{agent}and{session}replaced in values at the Job's creation (the agent fromspec.Agent), keys checked with apimachinery'sIsQualifiedNameand a stray{refused at load. Nothing telemetry-shaped in it: it is how a pod gets what an operator reads off its annotations (OpenTelemetry'sinstrumentation.opentelemetry.io/inject-sdkandresource.opentelemetry.io/*for the sandbox, in saraksh/kube next). Tests through kube's fake client and config's parser; the whole suite and lint pass.[kube] pod_annotations, and an agent's own over it by key, are put on the Job's pod template, with {agent} and {session} replaced in their values. A key that Kubernetes would refuse, or a placeholder that is neither, is refused when the configuration is loaded. Assisted-By: Claude <noreply@anthropic.com>Read at
205cd6a. Green here under-race,internal/kubeandinternal/configfive times withGOMAXPROCS=1. The shape holds: the pod template had no annotations of its own to collide with, the placeholders are filled from the Job's spec and not from anything an agent says, and a mistyped placeholder stops the server at load instead of reaching a pod.Two changes, both small:
The README.
pod_annotationsis in no page. "What a session's pod is given" is where it goes: the two tables, the agent's winning by key,{agent}and{session}, and the limit that comes with the check: a value cannot hold a brace of its own, so an annotation whose value is JSON cannot be set this way.A process agent.
[agents.<name>] process = truewithpod_annotationsloads and the annotations go nowhere, since a process has no pod.secretson a process is refused at load for that reason; refuse this beside it.As you see fit: Kubernetes checks an annotation's key after lower-casing it (
ValidateAnnotationsin apimachinery'spkg/api/validation/objectmeta.go), soExample.org/Nameis a key it takes and this refuses. Lower-case beforeIsQualifiedName, or let the changelog say "stricter".The changelog will meet #94's
### Addedunder Unreleased: whichever of the two lands second rebases, withAddedaboveChanged.205cd6a9a40b2526bbc20b2526bbc2c968e0e0a0c968e0e0a0f98c2b2ec0