ci namespace control plane #7
Labels
No labels
ready-for-agent
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lab/automation#7
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?
What to build
The shared
cinamespace on mini — the home for repo-declared CI. This is the first slice of the repo-declared CI architecture: application repos declare their own Argo Events sensors and workflows in a.ci/folder, and the cluster provides a shared control plane that hosts them.This ticket delivers the control plane:
cinamespace with an EventBus connected to the shared NATS cluster (existing basic-auth wiring).go-build-pushmarketplace workflow template available in thecinamespace. It coexists with the automation-namespace copy until the central catalog is retired in a later ticket — the central tag-build sensor still references the automation-namespace copy, so the old one must keep working.cinamespace with RBAC to manage sensors, workflows, and workflow templates there.cinamespace (proof-of-concept credential; replaced by per-project robots in a later ticket).Acceptance criteria
cinamespace exists on mini and its EventBus is connected to the shared NATS clustergo-build-pushworkflow template is available in thecinamespaceargo submitofgo-build-pushfrom thecinamespace (repolab/authz-bridge, ref = an existing tag) completes successfullyBlocked by
Implemented & verified (2026-09-22)
All acceptance criteria pass. Two commits:
lab/clusters(flux-clusters)775ee64e+4d159c04,lab/automationcf57227.Additional work beyond the ticket
clusters/mini/ci/— theciNamespace, theci-argocddestination SA, its Role/RoleBinding, and the read-onlynamespacesClusterRole/ClusterRoleBinding ArgoCD 3.x needs forkubectl auth reconcile(same pattern asclusters/mini/automation/).dev-applications/automation/project.yaml— addedmini/cito destinations and adestinationServiceAccountsentry routing mini/ci syncs toci-argocd. Ordering matters: ArgoCD'sDeriveServiceAccountToImpersonateis first-match-wins, so the ci entry precedes the*/*catch-all (which keeps automation-application onautomation-kubetenantsetup). The SA name is prefixed with the app's destination namespace by ArgoCD, so the SA lives inci.dev-applications/automation/ci-application.yaml— new ArgoCD Application (projectautomation, kept in the same project as requested) syncing this repo'sci/directory → mini/ci, prune+selfHeal.ci/directory in this repo (not underk8s/):k8s/is synced by automation-application into the automation namespace, whose destination SA has no RBAC inci. The control plane now lives inci/and is deployed by ci-application asci-argocd.default, so the ci EventBus shares the same stream as the automation bus on the shared NATS cluster (identical streamConfig, no conflict). Subjects aredefault.<eventsourcename>.<eventname>— keep EventSource/event names incidistinct from automation's to avoid subject collisions.argo submit -n ci wf:go-build-pushis v3 syntax; with the v4 CLI it'sargo submit -n ci --from wftmpl/go-build-push. The CLI creates a Workflow withworkflowTemplateRef(spec merged by the controller at runtime, soserviceAccountName: ci-buildapplies).Acceptance criteria
cinamespace exists on mini; EventBusdefaultConfigured on the shared NATS JetStream cluster (jetstreamExotic, basic auth via thenats-authExternalSecret, Vault-backed)go-build-pushWorkflowTemplate available inciargo submit -n ci --from wftmpl/go-build-push -p repo=https://git.animeteamspeak.moe/lab/authz-bridge -p ref=refs/tags/v0.1.1→ workflowgo-build-push-kbwnvSucceeded (pod ran asci-build— v4.0.3 executor requires the workflowtaskresults RBAC, which only that SA has)harbor.animeteamspeak.moe/library/authz-bridge:v0.1.1is now an OCI index with linux/amd64 + linux/arm64 (replaced the previous single-arch v0.1.1 manifest; Harbor has no immutability rule on the library project)automation/go-build-push(18h),automation/tag-buildsensor (Deployed),automation/defaultEventBus (22h) all unchanged; automation-application Synced/HealthyDeliverables checklist
ci/nats-auth.yaml)ci-argocd+ RBAC (eventbus, sensors, workflows, workflowtemplates, serviceaccounts, roles/rolebindings, externalsecrets + read-only namespaces)ci-build(workflowtaskresults Role/RoleBinding; Harbor push via mountedharbor-pushconfig.json, not RBAC)harbor-pushin ci (SecretSynced; per-project robots remain a later ticket)Implemented and verified across lab/clusters (775ee64e, 4d159c04) and lab/automation (
cf57227). All acceptance criteria pass: ci namespace + EventBus on the shared NATS, go-build-push template in ci, manual submit succeeded (go-build-push-kbwnv), multi-arch v0.1.1 in Harbor, automation-namespace central CI untouched. See the implementation comment for the ArgoCD project/app additions and the JetStream stream-sharing note.