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>
* 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>
* 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>
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>
* 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>