Repository navigation
Description
Problem or Motivation
This item is plan step 8 of the homelab migration in #5134. The migration moves the source of the homelab environment of Argo CD from devops-cli to the private repository https://github.com/dan-petty/homelab.
Argo CD refuses an Application source whose repository is not in the sourceRepos of its AppProject. Now the AppProjects homelab and homelab-system admit devops-cli and the Helm chart repositories only. Thus the switch of the Applications to the homelab repository (plan step 11) fails with a refused source.
The owner made the repository credential repo-homelab in namespace argocd. No Application tracks it, so project homelab reports it as an orphan. The Applications argocd, argocd-image-updater and base each show OrphanedResourceWarning with 1 orphaned resource.
Plan step 9 copies the environment into the homelab repository at the merge commit of this change. Thus this change must merge first, so that the copy of k8s/argocd/apps/projects.yaml admits the homelab repository with no edit.
Proposed Solution & Architectural Design
- AppProject
homelab(k8s/argocd/apps/projects.yaml): addhttps://github.com/dan-petty/homelabtosourceRepos, and add{group: '', kind: Secret, name: repo-homelab}toorphanedResources.ignore. - AppProject
homelab-system: addhttps://github.com/dan-petty/homelabtosourceRepos. This project has noorphanedResourcesblock, so it needs no ignore entry. - Both AppProjects keep
https://github.com/dan-petty/devops-cli, because Applicationdevopsreadsk8s/devopsfrom devops-cli after the switch. - No Application changes. At the merge, Application
clustersyncs the 2 AppProjects. No workload restarts, because no pod template changes. - Add the runbook
docs/HOMELAB_REPO_SWITCH.mdfor plan steps 10 to 17: the drift check and the baseline, the switch withdevops argo cd apps bootstrap-gitops, the freeze and soak, prune on, the live patches into homelab, the deletion of the override path and of the environment files, and the revert. Each step has a check and a revert. Each check prints names, keys, counts or exit codes only. The soak count is 12 Applications with the deployment subscription. k8s/README.mdtells that both AppProjects admit the homelab repository and links the runbook.- An invariant test in
tests/invariants/test_k8s_argocd_apps.pychecks the new entries.
Acceptance:
- After the merge,
kubectl get appproject homelab homelab-system -n argocd -o jsonpath='{.spec.sourceRepos}'listshttps://github.com/dan-petty/homelabfor each project. - All 34 Applications stay Synced.
- The
OrphanedResourceWarningforrepo-homelabgoes away onargocd,argocd-image-updaterandbase.
Target Subsystem
Kubernetes & Minikube Automation
Existing Tool Considered
Argo CD AppProject sourceRepos and orphanedResources.ignore (https://argo-cd.readthedocs.io/en/stable/user-guide/projects/) cover the need. The change only adds entries to them. The runbook uses existing tools: devops argo cd apps bootstrap-gitops, argocd app diff, kubectl, jq and devops prometheus query. Cost to build: about 0.4M tokens and 2 hours; nearly 0 to keep, because the runbook ends with step 17.
Standards Compliance
- I confirm this proposal aligns with AGENTS.md engineering principles (cyclomatic complexity <= 10, nesting <= 4 blocks, zero bare exceptions, tests that cover the changed lines).
- I am willing to submit a pull request implementing this feature with accompanying tests.
Source: #5134
Activity
dan-petty commentedon Nov 13, 2026
Both edit k8s/argocd/apps/projects.yaml AppProjects, but 1646 restricts kinds and reports orphans while this adds a new sourceRepo and an ignore entry.chore(main): release 0.127.0 (#5366)
devops-cli-service commentedon Nov 13, 2026
Released in v0.127.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.127.0
devops-cli-service commentedon Nov 13, 2026
Live since 2026-11-13 06:04 UTC
dan-petty commentedon Nov 13, 2026
Post-merge check (06:42Z): both AppProjects list https://github.com/dan-petty/homelab, and devops-cli stays. All 34 Applications are Synced (32 Healthy, 2 Progressing: the two whose volumes are on the node that is down). The OrphanedResourceWarning is gone on argocd, argocd-image-updater and base. Warnings that were there before stay on devops, llm, mattermost, open-webui and qdrant. The merge commit f299667 is commit S of homelab plan step 9 (homelab#23).