Repository navigation
feat(k8s): runtime children of the estate's own API groups (#1517) - #1518
Merged
Merged
Conversation
The #1077 runtime scan was deliberately scoped to Pods, which made the runtime tier blind exactly where it says the most: an operator estate's children are custom resources its controllers made (a MicroVMReplicaSet's MicroVMs, with proper ownerReferences), and no kind table could anticipate them. The scan now also sweeps the API groups the declared estate itself uses: each declared entity's non-core groupVersion is enumerated through the cluster's own discovery (K8sClient gains `resources(apiVersion)`, exposing the cached discovery list), and every namespaced, listable kind is scanned in the namespaces the observation already touched — the same open-world inversion behold#74 made for declared CRDs, applied to the runtime axis, and bounded by the declaration rather than a cluster-wide sweep. Core stays represented by Pods alone (sweeping every core kind would walk endpoints and events for nothing), and a swept object with no owner chain to a declared entity is not reported — the scan is not an inventory. Verified live on kubemicrovm-ops (k3d + floci, tier prod-ha): runtime children: 2 K8s::Lambda::MicroVM microvm-demo/kmv-dev-a-vm-42sgf → workloadReplicaSet K8s::Lambda::MicroVM microvm-demo/kmv-dev-a-vm-cs7t2 → workloadReplicaSet — previously zero. k8s suite green (45 describe-resources tests, 3 new); client 141; core 4033/4033; the pre-existing #1476/#1419 local-table failures unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HDqbe9YwXqqpF7VxFp1Drx
lex00
added a commit
that referenced
this pull request
Aug 9, 2026
…es instead of kinds (#1517) (#1609) The runtime-children sweep bounded itself by kind: first Pods (#1077), then the estate's own declared API groups (#1518). Both miss where the runtime tier says the most — an operator's children are whatever kinds its controllers make, including kinds in groups the estate never declares (a CR's Deployments, a chain through a foreign CRD group), and no kind list can anticipate them. The sweep now asks the cluster itself. K8sClient gains preferredGroupVersions() — one groupVersion per served group, from the same cached root discovery servedGroupVersions reads — and the sweep lists every listable kind those serve. What bounds it is reach, not a table: - namespaced kinds are listed only in the namespaces the declared estate touches (owner references cannot cross a namespace); - cluster-scoped kinds are listed only when a declared cluster-scoped entity resolved (a cluster-scoped object's owners are cluster-scoped, Kubernetes' own GC rule); - Events are skipped: they name their subject via involvedObject, never ownerReferences, so listing them can only cost; - outside Pods, a swept object is still only reported when its owner chain (or the #1549 label channel) resolves to a declared entity — the sweep is not an inventory. Tri-state honesty extends to the sweep: a kind discovery names but the sweep cannot list (RBAC denial, a flaking apiserver) becomes a runtime-sweep:* entry in unobserved — recorded once per kind, naming the scopes that failed — never a silent gap that would read as "no runtime children there". A list 404 stays an absence, and declared resolution is never failed by the sweep. The k8s lexicon's optional client dependency moves to ^0.42.1 so the workspace client (which carries the new method) links instead of the published 0.41.20 nesting under lexicons/k8s.
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.
The #1077 runtime scan was deliberately scoped to Pods, which made the
runtime tier blind exactly where it says the most: an operator estate's
children are custom resources its controllers made (a MicroVMReplicaSet's
MicroVMs, with proper ownerReferences), and no kind table could
anticipate them.
The scan now also sweeps the API groups the declared estate itself uses:
each declared entity's non-core groupVersion is enumerated through the
cluster's own discovery (K8sClient gains
resources(apiVersion),exposing the cached discovery list), and every namespaced, listable kind
is scanned in the namespaces the observation already touched — the same
open-world inversion behold#74 made for declared CRDs, applied to the
runtime axis, and bounded by the declaration rather than a cluster-wide
sweep. Core stays represented by Pods alone (sweeping every core kind
would walk endpoints and events for nothing), and a swept object with no
owner chain to a declared entity is not reported — the scan is not an
inventory.
Verified live on kubemicrovm-ops (k3d + floci, tier prod-ha):
runtime children: 2
K8s::Lambda::MicroVM microvm-demo/kmv-dev-a-vm-42sgf → workloadReplicaSet
K8s::Lambda::MicroVM microvm-demo/kmv-dev-a-vm-cs7t2 → workloadReplicaSet
— previously zero. k8s suite green (45 describe-resources tests, 3 new);
client 141; core 4033/4033; the pre-existing #1476/#1419 local-table
failures unchanged.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01HDqbe9YwXqqpF7VxFp1Drx