6 Commits
Author SHA1 Message Date
Ryan Bever b4e7ea79b9 refactor(controller): move kubelet client CSR approval into kubeletcsr (#2421)
Keep the client CSR controller and its certificate-request helpers out of the bootstrap package so serving approval can share them. Bootstrap identity and authorization keep their own condition helpers.

Signed-off-by: Ryan Bever <rbever@nvidia.com>
2026-11-23 10:02:53 -05:00
Ryan Bever c044392984 feat(controller): approve kubelet client CSRs for bootstrap identities (#2320)
* feat(controller): approve kubelet client CSRs for bootstrap identities

Add a management-cluster controller that approves the initial kubelet client
CSR for a Machine when the CSR matches the Machine's bootstrap identity and
expected node name. The controller reads tenant clusters through ClusterCache,
limited to Clusters NVKE manages, and reports the outcome in the
nvke.nvidia.com/KubeletClientCertificateIssued condition.

The controller runs only when controllers.bootstrap.enabled is set. The chart
grants approve on the kube-apiserver-client-kubelet signer inside that block.

Signed-off-by: Ryan Bever <rbever@nvidia.com>

* fix(controller): approve a kubelet client CSR retry after an earlier certificate is issued

Kubelet abandons a CSR after 15 minutes and creates a new one. Stopping approval once any certificate is issued leaves that retry unapproved until the ignored CSR is garbage collected.

Signed-off-by: Ryan Bever <rbever@nvidia.com>

---------

Signed-off-by: Ryan Bever <rbever@nvidia.com>
2026-11-16 17:21:05 -07:00
Ryan Bever 24f9faf1c5 refactor(controller): read bootstrap RBAC through ClusterCache (#2295)
* refactor(controller): read bootstrap RBAC through ClusterCache

The bootstrap authorization controller now gets its tenant client from
ClusterCache instead of TenantClientProvider. ClusterCache connects to
the same <cluster>-kubeconfig Secret that Cluster API uses, so this
controller no longer depends on the controller's node-agent or
kubeconfig fallback path.

The cache is created only when bootstrap controllers are enabled. Its
ClusterFilter is IsNVKEManagedCluster, which moves from the capi
package's unexported helper to an exported function so both controllers
share it.

The controller watches the cache's cluster source, so it reconciles
when a workload connection opens or closes. The 30-second RequeueAfter
on a missing connection is removed. When the cache is not connected,
the controller still sets WaitingForTenantAccess on the selected
Machines and returns.

The NICo provider ID controller and the Temporal activities still use
TenantClientProvider.

Signed-off-by: Ryan Bever <rbever@nvidia.com>

* work-sync

Signed-off-by: Ryan Bever <rbever@nvidia.com>

---------

Signed-off-by: Ryan Bever <rbever@nvidia.com>
2026-11-12 14:19:14 -07:00
Ryan Bever ab0154a7bc feat(controller): authorize SPIFFE bootstrap identities (#2130)
Add a controller that grants labeled, joining Machines the tenant RBAC required by kubeadm. Reconcile six kubeadm bindings from resolved SPIFFE identities and remove subjects after each Machine receives a node reference.

Gate the controller's tenant permissions on the bootstrap controller setting, report synchronization through Machine conditions, and cover the behavior with unit and chart assertions. CSR approval remains separate.

Signed-off-by: Ryan Bever <rbever@nvidia.com>
2026-11-05 07:23:44 -07:00
Ryan Bever 80d0daf05a feat(controller): add SPIRE NICo TPM bootstrap identity controller (#2108)
* feat(controller): add SPIRE NICo TPM bootstrap identity controller

Signed-off-by: Ryan Bever <rbever@nvidia.com>

* fix(controller): accept machine owners across CAPI versions

Parse controller owner API versions and match the Cluster API group instead of requiring the controller’s current version. Reject malformed or unrelated owner references.

Signed-off-by: Ryan Bever <rbever@nvidia.com>

* fix(controller): reconcile deleted NicoMachines

Signed-off-by: Ryan Bever <rbever@nvidia.com>

* fix(controller): clean up unresolved TPM identities

Signed-off-by: Ryan Bever <rbever@nvidia.com>

---------

Signed-off-by: Ryan Bever <rbever@nvidia.com>
2026-11-04 17:48:17 +00:00
Ryan Bever 0079021b6c feat(controller): add bootstrap controller configuration (#2086)
Signed-off-by: Ryan Bever <rbever@nvidia.com>
2026-11-03 10:14:23 -07:00