Argo CD any-namespace + dev-apps-source factory wiring #8
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#8
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
Two control-plane changes in the IaC repo so per-repo Argo CD applications can be factory-managed:
application.namespaces: *in the Argo CD Helm values). The current allowlist (argocd, automation, dev-*) is a tenant-model fossil.dev-apps-sourcefactory wiring on portable: a Flux GitRepository forlab/dev-apps-source(SSH, read key via ExternalSecret from Vault — verify the Vault secret exists and create a deploy key on the repo if it does not), thedev-apps-sourcenamespace, and a Kustomization syncing the repo'srepospath into that namespace.This makes
lab/dev-apps-sourcethe factory repo: per-repo Argo CD Application + AppProject manifests committed there are synced onto portable and picked up by Argo CD.Acceptance criteria
application.namespacesparameter is live-set to*(verified in the params configmap)dev-apps-sourceGitRepository is Ready on portable (SSH read key works)repospath oflab/dev-apps-sourcesyncs into thedev-apps-sourcenamespace on portabledev-apps-sourcenamespace is picked up by Argo CD (appears inargocd app list)Blocked by
Implementation note (verified against argo-cd v3.5.2 source — the version running on portable):
application.namespacesextends only the Application informer. The AppProject informer stays scoped to the control-plane namespace:controller/appcontroller.go:233—NewAppProjectInformer(applicationClientset, namespace, ...)(the controller's own namespace)GetAppProjectByName(..., ctrl.namespace, ...)→projLister.AppProjects(ns).Get(name)Implication for the factory design (#9): per-repo AppProject objects committed to the factory repo's
repos/path would be synced into thedev-apps-sourcenamespace (the Kustomization'stargetNamespace), where Argo CD does not see them. #9 needs either:argocdnamespace — e.g. a second factory path (e.g.projects/) with a second Kustomization targetingargocd; orlab-apps) with per-repoappRBACrules.No impact on #8's acceptance criteria (the smoke Application references
lab-appsinargocd).PRs: lab/clusters#1625 (wiring +
application.namespaces: *), lab/dev-apps-source#7 (fossil removal + smoke manifests).Implemented and verified on portable. All four acceptance criteria pass:
application.namespaceslive-set to*—argocd-cmd-params-cmshowsapplication.namespaces: *(propagated values.yaml → argocd-values CM → HelmRelease → helm upgrade).dev-apps-sourceGitRepository Ready —stored artifact for revision 'master@sha1:55daf0cc…'; the Vault read key works over SSH from portable. The ExternalSecret produces theidentity+known_hostssecret shape (template verified against ESO v2.10.0 semantics: defaultmergePolicy: Replacedrops non-templated keys, soidentityis templated explicitly;known_hostsis static).ConfigMap/das-smoke-test(fromrepos/_smoke/) is live in thedev-apps-sourcenamespace via the./reposKustomization.Application/das-smoke-testindev-apps-sourceis reconciled by the controller (OutOfSync/Healthy; manual-only by design, never auto-synced).PRs (all merged):
application.namespaces: *+ factory wiring deploy (outer Kustomization in flux-system) + fossil strip (kubetenant OCIRepository, dead kustomizeconfig)spec.target(CRD dry-run caught it)dataFromdropped by #1626 (ESO validating webhook caught it)repos/gofantasy-kubetenant.yamlremoved +repos/_smoke/test manifestssourceNamespaces: ["*"]onlab-apps(required: with any-namespace apps,AppProject.IsAppNamespacePermittedrejects apps whose namespace isn't in the project'ssourceNamespaces; verified in argo-cd v3.5.2 source)Open items:
repos/_smoke/is throwaway — delete once you've had a look (the smoke Application will show OutOfSync in the UI until then).Implemented and verified on portable: application.namespaces '*' live in argocd-cmd-params-cm, dev-apps-source GitRepository Ready (Vault SSH read key), repos/ smoke manifest synced into the dev-apps-source namespace, and the smoke Application reconciled by Argo CD. PRs: lab/clusters#1625/#1626/#1627, lab/dev-apps-source#7, lab/portable-cluster-argocd-apps#90. See verification comment above.