Repository navigation
v0.6.0
Added
-
Core API discovery (
src/k8s/discovery.zig). Wraps the two coremeta/v1
endpoints —GET /apisandGET /apis/{group}/{version}— behindhasGroup,
preferredVersionandfindResource(group, kind), the last returning a ready-to-use
CRDInfocarrying the version, plural and scope the server actually reports.This is the general answer to "support an API if the cluster has it, ignore it
otherwise", and it needs no third-party types. Hardcoding group + version + plural
gives three chances to be wrong and the resulting 404 is usually swallowed, so the
feature silently never activates — which is exactly what had happened downstream with
Cedar (cedar.k8s.io/v1alpha1/cedarpoliciesagainst a real API of
cedar.k8s.aws/<served>/policies).Establishes the boundary: APIs that are GA and near-universal stay typed in the
resource registry, where they are cheaper; optional and vendor-specific ones are
discovered at runtime. -
Gateway API standard channel completed — all 10 kinds of Gateway API v1.6.1.
AddsTCPRoute,TLSRoute,UDPRoute,BackendTLSPolicyandListenerSet, all at
v1and namespaced. Versions, plurals, scopes and spec fields were read from each
upstream CRD'sopenAPIV3Schemarather than inferred fromHTTPRoute. Half-covering
a GA API is worse than either extreme: callers cannot tell what is supported without
reading the table.ReferenceGrantdeliberately remains onv1beta1. v1.6.1 serves it at bothv1and
v1beta1, andv1beta1is stillstorage: true— bumping a correct pin would be
churn. There is a comment in the registry and a test that names the condition for
revisiting.
Fixed
- The resource registry now asserts its own contents. The existing tests constructed a
ResourceClientfrom hand-written literals and then asserted those same literals, so
they passed regardless of what the table held and a wrong group or plural shipped
silently. The new assertions read the real entry viainitFromRegistry— safe with an
undefinedclient, since every field comes fromcomptime metaFor(T)and the pointer
is never dereferenced. Verified by mutation: breaking one plural in the table fails
the suite, restoring it passes.
Notes
- Both additions are additive; no existing API changed.
- On Zig 0.17-dev the build still fails with two errors, both in dependency
build.zig
files and none in this project's source (zig-protobufuses the removed
Build.Step.StepOptions.id;yaml-ziguses the removedb.pathFromRoot). Because
those are build-script failures, this project's own source is never compiled on 0.17 —
so its 0.17 compatibility remains unknown rather than confirmed.