mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
machine-spire-entry, nico-spiffe and launchlayer-spiffe live in the capi package, whose controllers are meant to reconcile Kubernetes state only, but each looked its node up in Postgres: to learn whether the node uses TLS-JWT, which SPIRE attestation method it was pinned to, and whether SPIFFE is on. Publish that on the Machine instead. MachineAnnotations now writes spire-attestation-method and spiffe-enabled beside agent-connection, and the API refuses both from operator-supplied metadata. The three controllers read these annotations and wait while one is missing; the shared Machine predicate wakes them when one changes. A new machine-annotations controller copies the three annotations from the node record onto Machines created before they were written, and only onto a Machine whose host-id names the node, so existing clusters converge after an upgrade. The SPIFFE ID format moves to spiffe.NodeAgentID, which db.Node.GetSpiffeID now calls, and the LaunchLayer agent path is exposed as launchlayer.DSXImdsAgentPath. Signed-off-by: Abhay Krishna Arunachalam <abhaykrishna@nvidia.com>