Files
floci/docs
Priamo GermosenandAndre Kurait 77c11493e7 fix(eks): trust Floci's served certificate in the pod identity webhook (#9231)
The Pod Identity webhook manifest carried only Floci's local CA, so with
floci.tls.cert-path set the API server refused Floci's certificate, and
failurePolicy Ignore admitted every pod unchanged. Its URL named the
Docker host: with Floci in a container that is Floci's container IP,
which Floci's own certificate does not name. An adopted cluster also
kept the manifest written when its container was created.

The caBundle is now the bundle /_floci/ca.pem serves, which moves into
ContainerCaBundle so both read it from one place. The URL uses a host
the served certificate names, through the check custom resource response
URLs already make in ContainerReachableEndpoint: Floci's hostname when
the node resolves through Floci's embedded DNS, otherwise the Docker
host. When the certificate does not name that host, the webhook is
skipped with a warning, as it is with TLS off. Adopting a surviving
cluster writes the manifest again, and names Floci's hostname only when
the surviving node was created with Floci's DNS server as its resolver.

The manifest and the webhook k3s registered from it live on the
cluster's data volume, so a skipped webhook now replaces the manifest
with one holding no objects, and k3s deletes the webhook an earlier
start registered.

The manager's constructors that left collaborators out existed only for
tests; they move to a test-side factory, so the endpoint the webhook
needs is never null in production code.

Closes #5563

Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
2026-11-22 20:29:39 -04:00
..
2026-03-15 17:43:56 -05:00