T10: tofu-controller sync for provider roots (flux-clusters) #25
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lab/iac#25
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #2
What to build
The tofu-controller on mini (flux-clusters,
infra.contrib.fluxcd.io/v1alpha2TerraformCRs influx-system) currently syncs only two iac roots:forgejo, k8s, and argocd need the same wiring so each root reconciles against its target:
TerraformCR per root inclusters/mini/iac/(forgejo-config,k8s-config,argocd-config),sourceRefthe existingiacGitRepository (branch master), path./forgejo|./k8s|./argocdhashicorp/kubernetesprovider does not apply against fleet clusters. The k8s root renders per-app/per-cluster manifest bundles from catalog values (yamlencode/templatefile, zero cluster connectivity — per #31), then Sveltos + FluxCD apply them to the fleet (ClusterProfiles selecting by cluster label, #31/#34/#36). The runner only writes the rendered bundles into ConfigMaps/Secrets on mini. Credential:tofu-k8sKanidm SA API token (provisioned in #35) through the agentgateway apiserver route (https://kube-mini.<domain>, T13 #28), bearer token exchanged per request (aud=kubernetes) — same uniform path as Vault/Argo/Sveltos consumers (#29/#37/#36), no in-cluster runner SA. Note: first apply depends on the gateway + apiserver OIDC flags being live; seed out-of-band like the other roots' vars.ARGOCD_AUTH_TOKEN— Kanidm SA inargocd_admins(claimadmin), RFC 8693 viakanidm/scripts/kanidm-login.pyvarsFromSecrets per root (the existingkanidm-config-vars/vault-config-varsare created out-of-band, not in flux-clusters)Acceptance criteria
TerraformCRs for forgejo, k8s, argocd roots exist inclusters/mini/iac/and reconcile Readytofu-k8sKanidm SA API token through the gateway route (ConfigMap write only), argocd admin-claim SA tokenBlocked by
T7: Root wiring + pilot apps (integration) (#9) — the roots must validate/plan green in iac first.
The k8s root additionally depends on the Sveltos path landing first: Sveltos installed on mini (flux-clusters PR #1526 — HelmRelease + CRDs + staged ClusterProfiles), the Sveltos research (#31), and the Sveltos bootstrap (#34) — the ClusterProfiles that consume the rendered ConfigMaps must exist before
k8s-configis wired.Option — argocd root runner credential via agentgateway (2026-08-12): with #39 resolved and the Golden Path (#38) live, the
ARGOCD_AUTH_TOKEN/kanidm-login.pyapproach is no longer the only option. The runner can instead present its Kanidm SA API token to an agentgateway route for Argo CD (audience: argocd,scope: openid groups); agentgateway performs the RFC 8693 exchange per request and forwards a fresh token to the Argo CD API. Same single per-actor credential as the Sveltos/Argo cluster-auth cutovers (#36/#37), no login script in the runner. Adopt or reject when implementing.