Files
cozystack/pkg/cmd/server
Aleksei Sviridkin ef491f5ee8 fix(api): keep the MutatingAdmissionPolicy plugin out of admission
From k8s.io/apiserver v0.36 the MutatingAdmissionPolicy feature is GA
and on by default, and the plugin sits in the recommended admission
order, so cozystack-api would run it. The plugin refuses every write
with "not yet ready to handle request" until its informer has synced
mutatingadmissionpolicies. This server has no RBAC to list them, and
clusters older than 1.36 do not serve the resource at all, so every
create, update and delete on its resources would fail.

Disable the plugin in the default options, and again in Complete,
because --disable-admission-plugins replaces the default list instead
of adding to it. Naming the plugin in --enable-admission-plugins still
turns it on: that operator has granted it what it needs, and leaving it
on both lists would fail validation. On the v0.35 libraries the feature
gate already keeps the plugin off, so nothing changes today.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-09-26 16:08:25 +03:00
..