Repository navigation
Description
Problem
Checked: release/v0.2.25 at e9973c7 (every cited line is the same at 132ecc5); the Argo CD v3.5.3 docs (operator-manual/cluster-bootstrapping.md, user-guide/diffing.md, user-guide/projects.md, declarative-setup) and source (app_project_types.go); and the homelab read-only on 2026-10-03.
Owner directions (2026-10-06 update).
- When Gitea is implemented, Argo CD applications should point to Gitea for both git and container registries.
- Development versions will be available to the cluster for all open pull requests.
- Development images built for open PRs will be pushed to Gitea's in-cluster container registry and reconciled by Argo CD so there is zero gap between PR development and cluster availability.
- Argo CD reads Git sources and pulls images directly from Gitea over in-cluster HTTP / internal registry endpoints.
What changed. The earlier body of this item switched every Application to read the release branch from a read-only Gitea mirror, to survive GitHub outages. On 2026-10-03 the owner made Gitea a writable internal forge ("internal iterative development that can happen without going out to github"). The owner also said "Gitea should be able to communicate inside the cluster using http". Three changes follow:
- No mirrors. feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081 has no pull mirrors. Gitea's copy of
mainis carried over bydevops repos syncon the workstation (feat(repos): Add a gitea remote to every clone under repos/ #1090), so it lags GitHub until someone syncs. mainstays on GitHub. GitHub is authoritative for it. An Application reading Gitea's copy would deploy later than one reading GitHub, and only when a workstation has synced. It would gain outage tolerance only by adding an in-cluster sync job.- Iterations have no way into the cluster. Argo CD tracks
mainwith self-heal, somainis the integration environment: self-heal reverts live trials in managed namespaces. A branch that exists only on Gitea cannot be deployed at all.
Argo CD already reads GitHub. Every Application at the tip uses https://github.com/dan-petty/devops-cli.git (k8s/argocd/apps/root-app.yaml:12, infra-apps.yaml:12 and :36, llm-apps.yaml:12), as it has since 22bba04 (#38, v0.2.11).
Argo CD's path to Gitea.
- The URL. In the cluster,
http://gitea-http.gitea.svc.cluster.local:3000, the chart's ClusterIP Service (feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081). Argo CD never uses the workstation aliashttps://git.<domain>: that path takes the credential out of the cluster to Cloudflare and back through the tunnel, and makes trials depend on Cloudflare. Access is no fence there: the cluster's nodes leave through the same home connection as the workstation, so the public-IP bypass would likely admit them too [inference]. - No credential. Argo CD's repo-server has none for Gitea.
- Gitea's side. feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081's policy admits
argocd-repo-serverpods on TCP 3000. - Argo CD's own policy. k8s/argocd/networkpolicy.yaml opens no port to Gitea. In the homelab this file is not applied, and feat(k8s): argo cd keeps the homelab cluster at the current release branch, with automated sync, prune and self-heal that never delete data #755 leaves it unsynced, but it should be right for when it is (fix(k8s): deploy-stack applies the monitoring namespace perimeter #913's follow-up).
The devcontainer git daemon. Its removal was part of this item. It now has its own item, #1122, with no dependency (the owner: "the git daemon is a stub that was meant to enable simple argocd integration"). This item no longer touches it.
Acceptance criteria
In the gate. These tests are offline and use structural tuple assertions. New tests add under 1 s, checked with uv run pytest tests/test_k8s_argocd_trial.py tests/test_argo_trial.py tests/test_k8s_network_policies.py tests/test_k8s_push_secrets.py --durations=0.
- AppProject
trial. It joins feat(k8s): argo cd keeps the homelab cluster at the current release branch, with automated sync, prune and self-heal that never delete data #755's k8s/argocd/apps/projects.yaml:sourceReposis exactlyhttp://gitea-http.gitea.svc.cluster.local:3000/*/*. Argo CD matches source globs with/as a separator (pkg/apis/application/v1alpha1/app_project_types.go:471 at v3.5.3), so a single/*would match no<owner>/<repo>URL;destinationsis exactly namespacetrial-*onhttps://kubernetes.default.svc;clusterResourceWhitelistis exactly[]: a trial may create no cluster-scoped object, not even a Namespace. A Namespace kind in the list, even one restricted byname, would let a trial's manifests relabel its own Pod Security level or take over another namespace, and the finalizer would delete that namespace when the trial ends.- A test asserts the three fields. It also asserts that no namespace in the
homelaborhomelab-systemdestinations matchestrial-*.
- Safety rule. A test asserts that every git source (not Helm chart sources) of every Application under k8s/argocd/ is
https://github.com/dan-petty/devops-cli.git, and that no source of any Application names a Gitea URL, in-cluster orgit.alias. That coversbootstrap,cluster,argocd,giteaand every release-tracking leaf. A broken Gitea can therefore always be fixed by a commit on GitHub, and nothing but a trial depends on Gitea. - Orphans. feat(k8s): argo cd keeps the homelab cluster at the current release branch, with automated sync, prune and self-heal that never delete data #755's
homelaborphan-ignore list gains Applications namedtrial-*. Trial Applications are not in git, carry no tracking label, and are never pruned bycluster. - Argo CD credential. feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's push-secrets table gains the Secret
argocd/gitea-repo-creds:- label
argocd.argoproj.io/secret-type: repo-creds; url=http://gitea-http.gitea.svc.cluster.local:3000/(fixed);username← configgitea.argocd_username;type=git(fixed);password← keyringgitea_argocd_token, a new managed optiongitea.argocd_tokenwith aread:repositorytoken, required, never generated;- stack
gitea, no restart target (Argo CD reads repository credentials on use). - Pushed only where Gitea runs. The Secret lives in
argocd, which minikube has too. Under feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's rule ("rows of stacks deploy-stack never deploys … whose namespace exists"), the gate for this row is namespacegitea, not the Secret's own namespace; otherwise a minikube deploy-stack would fail on a missinggitea_argocd_token. feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's table gains that gate field if it has none. - tests/test_k8s_push_secrets.py asserts the row, its label and literals, and that a stubbed cluster without namespace
giteaskips it under--stack(feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's table already carries labels and literal values).
- label
- Policy.
- k8s/argocd/networkpolicy.yaml gains egress to Gitea's pods in namespace
giteaon TCP 3000. - tests/test_k8s_network_policies.py asserts that rule as a tuple.
- The daemon item removes port 9418 from the same file and test. Whichever PR lands second rebases; neither waits for the other.
- k8s/argocd/networkpolicy.yaml gains egress to Gitea's pods in namespace
-
devops argo cd trial start --branch BRANCH --path PATH [--repo OWNER/NAME] [--name NAME] [--context CTX] [--dry-run]:- Defaults.
--repodefaults todan-petty/devops-cli, and--nameto the branch name made into a DNS label. - Checks before applying. The branch exists on Gitea (
GET /repos/{o}/{r}/branches/{b}, 200 or 404, through feat(repos): Add a gitea remote to every clone under repos/ #1090's client atgitea.url), andPATHexists in it. AGiteaAccessBlockedfrom that client exits 1 with its message. - The namespace. It server-side applies Namespace
trial-<name>with the labelapp.kubernetes.io/managed-by: devops-cliand Pod Securityrestrictedfor enforce, warn and audit. The CLI owns it, not Argo CD, since projecttrialadmits no cluster-scoped kind. - The Application it applies.
trial-<name>inargocd, applied withget_argo_crd_service(context).apply_application, asbootstrap-gitopsdoes (src/devops_cli/commands/argo.py:378-383). It sets:- project
trial; repoURL: http://gitea-http.gitea.svc.cluster.local:3000/<owner>/<name>.git,targetRevision: BRANCHandpath: PATH;- destination namespace
trial-<name>; resources-finalizer.argocd.argoproj.io;- automated sync with prune and selfHeal, so every push to the branch redeploys;
- no
CreateNamespace: the namespace exists before the Application.
- project
- Output. The Application name and how to follow it.
- Dry run.
--dry-runprints the Application and applies nothing.
- Defaults.
-
devops argo cd trial end NAME:- deletes the Application, and the finalizer removes its resources;
- waits up to 120 s for the Application to go;
- then deletes namespace
trial-<name>. - Any other name, or a namespace not starting with
trial-, exits 1.
-
devops argo cd trial list: the Applications in projecttrial, with branch, path, sync status, health and age. - Trial tests. tests/test_argo_trial.py covers:
- the rendered Namespace (a structural tuple of name and labels) and Application (project, in-cluster
repoURL, revision, path, destination and sync options, with noCreateNamespace); - refusal when the branch is missing, with no apply;
enddeleting nothing outsidetrial-*;--dry-runapplying nothing.- It uses a recording CRD-service stub and an
httpx2.MockTransportfor Gitea.
- the rendered Namespace (a structural tuple of name and labels) and Application (project, in-cluster
- Docs.
- The
trialhelp strings go inlang/en/help.py. Regenerate docs/commands/argo.md and docs/CLI_REFERENCE.md withdevops docs generate. - The "Gitea" section in k8s/README.md gains "Trials", which covers:
- what a trial is for: new components, or manifests that do not name a managed namespace;
- why changes to an existing stack still go through a PR to
main; - that Argo CD reads Gitea over in-cluster HTTP, while people push to
https://git.<domain>; - the one-time credential setup: a
read:repositorytoken, thendevops config set gitea.argocd_tokenandpush-secrets; - start, follow, end;
- that trial namespaces get no NetworkPolicy unless the trial brings one;
- that every Application on
mainreads GitHub, and why.
- The
-
uv run devops cipasses within its 5-minute budget.
Checks a person runs (on the cluster's kube context, after #1081's and #1090's checks pass):
- Pending a person, Credential:
uv run devops k8s push-secrets --only argocd/gitea-repo-credsexits 0.kubectl -n argocd get secret <masked-token> -o jsonpath='{.metadata.labels.argocd\.argoproj\.io/secret-type}{"\n"}'printsrepo-creds(labels only, no value read), andkubectl -n argocd exec deploy/argocd-repo-server -- env GIT_TERMINAL_PROMPT=0 git ls-remote http://gitea-http.gitea.svc.cluster.local:3000/dan-petty/devops-cli.git HEADfails with an authentication error, not "connection refused" or a timeout. That shows the path is open.
- Pending a person, Trial:
- In a devops-cli worktree, add a directory
k8s/trial-smoke/holding one ConfigMap with no namespace. Commit it on a branchtry/smokeand rungit push gitea try/smoke. Nothing goes to GitHub. uv run devops argo cd trial start --branch try/smoke --path k8s/trial-smokeexits 0.- Within 5 minutes,
kubectl -n trial-try-smoke get configmaplists the ConfigMap, andkubectl get ns trial-try-smoke -o jsonpath='{.metadata.labels.pod-security\.kubernetes\.io/enforce}'printsrestricted. - Push a change to the ConfigMap on Gitea. It reaches the cluster within one reconciliation.
uv run devops argo cd trial end try-smokeexits 0, andkubectl get ns trial-try-smokereports NotFound.
- In a devops-cli worktree, add a directory
- Pending a person, Fenced:
- a trial whose path renders a manifest with
namespace: llmstays OutOfSync, and Argo CD reports that the namespace is not permitted in projecttrial. Nothing inllmchanges; - a trial whose path renders a
Namespace(any name) fails to sync, and Argo CD reports that the cluster-scoped kind is not permitted.kubectl get ns trial-<name> -o jsonpath='{.metadata.labels.pod-security\.kubernetes\.io/enforce}'still printsrestricted.
- a trial whose path renders a manifest with
- Pending a person, Gitea outage:
- With a trial running,
kubectl -n gitea scale deploy/gitea --replicas=0. - Every Application outside project
trialstays Synced and Healthy. - The
giteaApplication, which reads GitHub, scales Gitea back within its self-heal interval.
- With a trial running,
Key questions
- Should Argo CD read Gitea? Decided (owner, 2026-10-06): When Gitea is implemented, Argo CD applications should point to Gitea for git and container registries, and development versions will be available to the cluster for all open pull requests. Release/production branches on GitHub continue to be mirrored to Gitea, while iteration branches and PR development versions run against Gitea directly with zero gap.
mainis GitHub's. Gitea's copy is carried over by a workstation (devops repos sync). Reading it would add lag and make deploys depend on someone syncing, unless an in-cluster sync job were added.- What the earlier design gained. Riding out a GitHub outage. That is not worth a new component for a one-owner lab. If it becomes worth it, that is its own item.
- Trials deploy a Gitea branch with no GitHub involvement, which is the iteration the owner described.
- Which URL does Argo CD use? Decided (owner, 2026-10-03): in-cluster HTTP ("Gitea should be able to communicate inside the cluster using http"),
http://gitea-http.gitea.svc.cluster.local:3000. Plain HTTP inside the cluster also follows feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's precedent,http://llm-gateway.llm.svc.cluster.local:4000/v1. Theread:repositorytoken then crosses the LAN unencrypted whenever the repo-server and Gitea run on different nodes, because flannel'svxlanbackend does not encrypt (feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081's key question on in-cluster HTTP). - Is the safety rule kept? Proposed: yes, in a stronger form. No Application in git reads Gitea, so a broken Gitea can be fixed by a commit on GitHub, and it can only stop trials.
- Why separate trial namespaces instead of pointing a managed Application at a branch? Proposed: retargeting a child of
clusterneedsignoreDifferenceson its source.- The cost of retargeting. That hides the drift, and drift goes against the owner's GitOps rule.
- What the AppProject gives instead. It fences trials into
trial-*with no cluster-scoped kinds at all (the CLI creates the namespace), so a trial cannot touch a managed stack or its own namespace's Pod Security labels. A manifest naming one fails to sync rather than overwriting it. - The limit. Changing an existing stack is still tried with
kubectl diffand goes through a PR tomain.
- How does Argo CD authenticate to Gitea? Proposed: with a
repo-credsSecret written bypush-secretsfrom aread:repositorytoken in the keyring. Argo CD matches it by URL prefix (declarative-setup). A token scoped to reading needs no extra account, and no Job to create one. - How fast does a trial follow a push? Proposed: Argo CD's reconciliation interval, 120 s plus up to 60 s of jitter (feat(k8s): argo cd keeps the homelab cluster at the current release branch, with automated sync, prune and self-heal that never delete data #755).
devops argo cd apps sync trial-<name>is immediate. A Gitea → Argo CD webhook is a later option, and it would also go over in-cluster HTTP. - What happens on minikube? Proposed: minikube has no Gitea.
trial startfails at the branch check, naming feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081, and minikube keeps being deployed bydevops k8s deploy-stack. - Does the git daemon removal stay here? Decided (owner, 2026-10-03): no, it is its own item. "The git daemon is a stub that was meant to enable simple argocd integration." Nothing in the repository reads from
git://(the onlygit://text is a review-report test fixture), and Argo CD has read GitHub since v0.2.11, so that item has no dependency.
Strategic alignment
- Parent: feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081 (the Gitea family; order: feat(k8s): argo cd keeps the homelab cluster at the current release branch, with automated sync, prune and self-heal that never delete data #755 and feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741, then feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081, then feat(repos): Add a gitea remote to every clone under repos/ #1090, then this item).
- Priority: P2. It gives iteration branches a path into the cluster that does not touch GitHub.
- Value / Effort: Medium / Medium.
- Python: three small
trialsubcommands. - Elsewhere: the AppProject, one push-secrets row, the policy rule and the docs.
- Python: three small
- Depends on:
- feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081, deployed;
- feat(repos): Add a gitea remote to every clone under repos/ #1090 (Gitea client and the Gitea remote on the devops-cli checkout);
- feat(k8s): argo cd keeps the homelab cluster at the current release branch, with automated sync, prune and self-heal that never delete data #755 (AppProjects, orphan list);
- feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741 (push-secrets).
- Related:
- fix(security): the devcontainer no longer starts the git daemon stub meant for argo cd, which served every clone under repos/ without authentication on port 9418 #1122 (the devcontainer git daemon removal): it edits the same Argo CD policy file and test.
- feat(release): cut v0.2.11 release with DevSecOps hardening and GitHub management #38 (22bba04): moved Argo CD off
git://. - fix(k8s): deploy-stack applies the monitoring namespace perimeter #913: its follow-up applies the Argo CD perimeter.
- Source: the owner, 2026-10-03.
Update 2026-10-08: refinement
- The criteria cover only manual trials, not the owner's 2026-10-06 direction (all open pull requests, images), and the Safety rule contradicts feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291.
- (proposed)
bootstrap,cluster,argocdandgitearead GitHub, feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291 owns the one exemption, and trial and pull-request Applications read Gitea through the ApplicationSet Pull Request generator (off today,k8s/argocd/values.yaml:87-88). - A criterion names where pull-request images are pushed and pulled from.
- feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291 and this item share one credential design. The perimeter is fix(k8s): the argocd and otel perimeters admit 0.0.0.0/0 ingress and deploy-stack applies neither #1371 (v0.2.31).
Alternatives check of 2026-11-18: none.
Tool: none found.
Reason: Searches found Argo CD and Gitea as building blocks, plus a generic preview-environment example; no tool provides the Gitea-backed trial CLI, namespace fence, credentials and cleanup.
Lacks:
- No ready-made trial start, end or list command
- No bundled Gitea repo credential, AppProject fence or egress rule
- No per-trial namespace creation with restricted Pod Security and cleanup
Proposed design
Problem statement
Argo CD reads GitHub for every Application. The owner wants iteration branches and open pull requests to deploy from Gitea in-cluster. This item delivers the manual trial path: AppProject trial, the Gitea repository credential, the Argo CD egress rule, and devops argo cd trial start, end and list. It defers automatic all-open-PR Applications and the PR image path to a new issue. That part needs a namespace lifecycle, the shared credential from #1291, and the perimeter from #1371.
Acceptance criteria
Requirement: Trial AppProject
The AppProject trial SHALL admit only Gitea source URLs, only trial-* destination namespaces, and no cluster-scoped resource.
Scenario: Trial project fields
- WHEN the test reads the
trialAppProject fromk8s/argocd/apps/projects.yaml - THEN it asserts sourceRepos is exactly
http://gitea-http.gitea.svc.cluster.local:3000/*/*, destinations is exactly namespacetrial-*onhttps://kubernetes.default.svc, and clusterResourceWhitelist is exactly[].
Requirement: Managed destination isolation
No destination of AppProject homelab or homelab-system SHALL match trial-*.
Scenario: Managed projects do not admit trial namespaces
- WHEN the test reads every destination namespace of projects
homelabandhomelab-system - THEN it asserts no namespace matches the glob
trial-*.
Requirement: GitHub safety rule
Every git source of every Application under k8s/argocd/ SHALL be https://github.com/dan-petty/devops-cli.git, except the one Application that #1291 exempts, and no Application SHALL name a Gitea URL.
Scenario: No unexempted Application reads Gitea
- WHEN the test reads every Application under
k8s/argocd/and skips Helm chart sources - THEN it asserts each git source is the GitHub URL and no source names a Gitea URL, except the single feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291 exemption.
Requirement: Trial Applications orphan ignore
The homelab AppProject orphan-ignore list SHALL include Applications named trial-*.
Scenario: Trial Applications are not pruned
- WHEN the test reads the orphan ignore list of the
homelabAppProject - THEN it asserts an entry for group
argoproj.io, kindApplication, and nametrial-*.
Requirement: Gitea repository credential
The push-secrets table SHALL contain a row for Secret argocd/gitea-repo-creds with the repo-creds label, the fixed Gitea URL, the configured username, the git type, the keyring token, stack gitea, no restart target, and a gate on namespace gitea.
Scenario: Credential row and gate
- WHEN the test reads the push-secrets table and runs the row against a stub cluster without namespace
gitea - THEN it asserts the row, its label and literals, and that the row is skipped.
Requirement: Argo CD egress to Gitea
The Argo CD perimeter SHALL admit egress to pods in namespace gitea on TCP 3000.
Scenario: Gitea egress tuple
- WHEN the test reads
k8s/argocd/networkpolicy.yaml - THEN it asserts an egress rule with namespace selector
giteaand port TCP 3000.
Requirement: Trial start objects
devops argo cd trial start SHALL create a trial- namespace with restricted Pod Security and SHALL apply a trial Application that reads the Gitea branch and path.
Scenario: Rendered trial objects
- WHEN the test runs
trial start --branch try/smoke --path k8s/trial-smokewith a recording CRD stub and a GiteaMockTransport - THEN it asserts the Namespace name, labels and Pod Security levels, and the Application project, in-cluster repoURL, revision, path, destination, finalizer, sync options, and no
CreateNamespace.
Requirement: Trial start branch check
devops argo cd trial start SHALL check the branch and path on Gitea before it applies anything, and SHALL exit 1 on a missing branch or a GiteaAccessBlocked.
Scenario: Missing branch applies nothing
- WHEN the test runs
trial startfor a branch that Gitea returns 404 for - THEN it asserts exit status 1 and that the CRD stub recorded no apply.
Requirement: Trial start defaults
devops argo cd trial start SHALL default --repo to dan-petty/devops-cli and --name to the branch name made into a DNS label.
Scenario: Default repository and name
- WHEN the test runs
trial start --branch try/smoke --path k8s/trial-smokewithout--repoor--name - THEN it asserts the Application uses
dan-petty/devops-cliand the namespace istrial-try-smoke.
Requirement: Trial end order
devops argo cd trial end NAME SHALL delete the Application before the namespace and SHALL wait up to 120 s for the Application to go.
Scenario: End deletes in order
- WHEN the test runs
trial end try-smokewith a stub that records requests - THEN it asserts the Application delete precedes the namespace delete and the wait is 120 s.
Requirement: Trial end refusal
devops argo cd trial end NAME SHALL exit 1 for any name that does not start with trial-.
Scenario: End refuses a non-trial name
- WHEN the test runs
trial end llm - THEN it asserts exit status 1 and that no delete request was recorded.
Requirement: Trial list output
devops argo cd trial list SHALL list the Applications in project trial with branch, path, sync status, health and age.
Scenario: List fields
- WHEN the test runs
trial listwith a stub that returns two trial Applications - THEN it asserts the output rows contain the five fields.
Requirement: Trial dry run
devops argo cd trial start --dry-run SHALL print the Application and SHALL make no apply request.
Scenario: Dry run records no apply
- WHEN the test runs
trial start --dry-run - THEN it asserts the printed Application and no recorded apply.
Requirement: Trial help and generated docs
The trial help strings SHALL be in src/devops_cli/lang/en/help.py, and docs/commands/argo.md and docs/CLI_REFERENCE.md SHALL be regenerated.
Scenario: Generated docs name trial commands
- WHEN the test runs
uv run devops docs generate - THEN it asserts both generated files contain
devops argo cd trial start,end, andlist.
Requirement: Trial README
The Gitea section of k8s/README.md SHALL describe trial purpose, credential setup, start, follow, end, and the GitHub-versus-Gitea split.
Scenario: README covers trial topics
- WHEN the test reads the Gitea section of
k8s/README.md - THEN it asserts the section names every required topic.
Requirement: CI budget
uv run devops ci SHALL pass within its 5-minute budget.
Scenario: CI passes
- WHEN the test runs
uv run devops cion the branch - THEN it asserts exit code 0 within 300 s.
Existing Tool Considered
The alternatives check of 2026-10-29 found no tool that covers the custom trial lifecycle. Argo CD covers the AppProject fence and reconciliation, and Gitea covers the forge. The custom CLI costs about 9,000 tokens to build, 2,500 to keep and 1,200 to fix, with about 2 days elapsed.
Key questions
- Should Argo CD read Gitea for trial Applications?: Yes. Manual trial Applications read Gitea over in-cluster HTTP. Every Application in git keeps reading GitHub, except the one exemption that feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291 owns. (best practice) [sources: k8s/argocd/apps/projects.yaml, k8s/argocd/networkpolicy.yaml]
- Chosen: Gitea for trials and the feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291 exemption. It follows the owner decision and keeps production on GitHub.
- Rejected: GitHub only. It gives no path for an iteration branch into the cluster.
- Rejected: Gitea for every Application. It makes deploys depend on a workstation sync of Gitea's copy of main.
- Which URL does Argo CD use for Gitea?:
http://gitea-http.gitea.svc.cluster.local:3000. (best practice) [sources: k8s/argocd/networkpolicy.yaml, k8s/argocd/apps/projects.yaml]- Chosen: In-cluster HTTP. It stays inside the cluster and follows the owner direction and feat(k8s): devops-cli runs in the homelab cluster as Jobs, and every cluster Secret is pushed from the keyring, also by deploy-stack (devops k8s push-secrets, devops k8s run-job) #741's precedent.
- Rejected: Public
https://git.. It sends the credential through Cloudflare and makes trials depend on the tunnel. - Rejected: GitHub. It cannot serve a branch that exists only on Gitea.
- How does Argo CD authenticate to Gitea?: With the
repo-credsSecretargocd/gitea-repo-creds, written bypush-secretsfrom aread:repositorytoken in keyringgitea_argocd_token. (best practice) [sources: src/devops_cli/k8s/secret_push.py]- Chosen: One repo-creds Secret. Argo CD matches it by URL prefix and one token reads every trial repository.
- Rejected: One repository Secret for each trial. It needs a new Secret for each trial and adds no safety.
- Rejected: Anonymous read. Gitea is a locked forge and admits no anonymous repository read.
- Why separate trial namespaces instead of retargeting a managed Application?: Retargeting needs
ignoreDifferencesand hides drift. AppProjecttrialfences trials intotrial-*with no cluster-scoped kinds, and the CLI creates the namespace. (best practice) [sources: k8s/argocd/apps/projects.yaml]- Rejected: Retarget a child of
cluster. It hides drift and breaks the GitOps rule. - Chosen: New
trialAppProject with CLI-owned namespaces. It fences trials without cluster-scoped kinds and keeps managed stacks untouched. - Rejected: Shared trial namespace. Concurrent trials can overwrite each other's resources.
- Rejected: Retarget a child of
- What Pod Security level do trial namespaces use?:
restrictedfor enforce, warn and audit. (best practice) [sources: k8s/argocd/apps/projects.yaml, src/devops_cli/commands/argo.py]- Chosen: restricted. It matches the cluster's default and limits a trial's blast radius.
- Rejected: baseline. It admits more privileged settings than a trial needs.
- Rejected: privileged. It lets a trial change node-level settings.
- How fast does a trial follow a push?: Argo CD's reconciliation interval, 120 s plus up to 60 s of jitter.
devops argo cd apps sync trial-is immediate. (best practice) [sources: docs/commands/argo.md, k8s/argocd/apps/projects.yaml]- Chosen: Polling with manual sync. It needs no new webhook and uses the existing reconciliation.
- Rejected: Gitea-to-Argo CD webhook. It adds a later component and network path.
- Rejected: No automatic sync. Every push would need a person to run sync.
- What happens on minikube?: Minikube has no Gitea.
trial startfails at the branch check with a message that names feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081, and minikube keeps usingdevops k8s deploy-stack. (best practice) [sources: src/devops_cli/commands/argo.py, k8s/argocd/apps/projects.yaml]- Chosen: Fail with a clear message. It tells the person that the homelab Gitea stack is required.
- Rejected: Fall back to GitHub. It cannot serve a branch that exists only on Gitea.
- Rejected: Skip the command. It hides the missing dependency.
- Does the git daemon removal stay in this item?: No. It is fix(security): the devcontainer no longer starts the git daemon stub meant for argo cd, which served every clone under repos/ without authentication on port 9418 #1122, and this item does not touch the git daemon. (best practice) [sources: k8s/argocd/networkpolicy.yaml, src/devops_cli/commands/argo.py]
- Chosen: Separate item fix(security): the devcontainer no longer starts the git daemon stub meant for argo cd, which served every clone under repos/ without authentication on port 9418 #1122. The owner decided that the git daemon is a stub with its own scope.
- Rejected: Keep it here. It mixes an unrelated removal into the trial feature.
- How does the safety rule reconcile with feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291?: Every Application in git reads GitHub, except the one exemption that feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291 owns. This item adds no Gitea-reading Application in git, and trial Applications are created at runtime. (best practice) [sources: k8s/argocd/apps/projects.yaml, k8s/argocd/networkpolicy.yaml]
- Chosen: One feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291 exemption. It keeps a broken Gitea from stopping production and leaves the exception with its owner.
- Rejected: No exemption. It contradicts feat(k8s): Read homelab config from in-cluster Gitea, drop overrides #1291 and blocks its delivery.
- Rejected: Gitea for every Application. It makes main depend on a workstation sync and a healthy Gitea.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNew
- StatusShow more project fieldsNew
Activity
[-]feat(k8s): argo cd reads the homelab's manifests from the in-cluster gitea mirror, and the devcontainer git daemon is gone[/-][+]feat(k8s): argo cd deploys iteration branches from gitea into trial namespaces while everything on the release branch keeps reading github, and the devcontainer git daemon is gone[/+][-]feat(k8s): argo cd deploys iteration branches from gitea into trial namespaces while everything on the release branch keeps reading github, and the devcontainer git daemon is gone[/-][+]feat(k8s): argo cd deploys iteration branches from gitea over in-cluster http into fenced trial namespaces, while everything on the release branch keeps reading github[/+][-]feat(k8s): argo cd deploys iteration branches from gitea over in-cluster http into fenced trial namespaces, while everything on the release branch keeps reading github[/-][+]feat(k8s): argo cd points to gitea for git and container registries, serving development versions to the cluster for all open pull requests[/+]dan-petty commentedon Oct 18, 2026
Correction from a read-only cluster audit (2026-10-17, main 3dd7fa6): the ApplicationSet controller is not off.
k8s/argocd/values.yaml:87-88setsapplicationSet: enabled: false, but chart argo-cd 10.9.6 has noapplicationSet.enabledkey (chartvalues.yaml:3546-3551:name,replicas: 1), and its applicationset Deployment template has no if-guard.helm templatewith the repo values renders the controller at replicas 1.argocd/argocd-applicationset-controllerruns 1/1, with a Service on 7000. Its Role grants create/delete/patch/update on applications and applicationsets and get/list/watch on secrets in argocd. No NetworkPolicy selects the pod, andget applicationsets -Areturns nothing.applicationSet.replicas: 0with a comment pointing here. When this item enables the Pull Request generator, it sets replicas to 1 or more and adds a NetworkPolicy for the controller's webhook port 7000 and metrics port 8080, inside the namespace's default-deny perimeter.fix(k8s): the unauthenticated in-cluster image registry leaves the cl…
dan-petty commentedon Oct 24, 2026
Findings from the delivery of #1081 (PR #2145, 2026-10-24) that this item must use:
gitea-http.gitea.svc.cluster.local:3000). Cloudflare refuses a request body over 100 MB (Free and Pro plans) with 413, so a large image layer cannot be pushed throughhttps://git.<domain>. This item must choose a path that does neither: for example, a pull address that the nodes can reach on the LAN, and pushes from inside the cluster.giteayet; Gitea's own perimeter (feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #2145) already admitsargocd-repo-server.ROOT_URLis the in-cluster address withPUBLIC_URL_DETECTION = auto. Gitea 1.27.3 builds clone URLs and the registry token realm of each request from itsHostheader andX-Forwarded-Proto, so requests through the tunnel gethttps://git.<domain>URLs. Text that Gitea writes outside a request (the links that a push prints) shows the in-cluster address.registries.yaml; its mirror for Gitea needs the address from the first point, and credentials inconfigs.<mirror>.auth.feat(k8s): the homelab runs gitea under argo cd as a read-write inter…
fix(k8s): a manual sync of the app-of-apps drops the homelab host ove…
9 remaining items
[-]feat(k8s): argo cd points to gitea for git and container registries, serving development versions to the cluster for all open pull requests[/-][+]feat(k8s): Point Argo CD to Gitea for git and PR dev images[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 128 characters, and the limit is 60. The type and the scope stay.
feat(k8s): argo cd points to gitea for git and container registries, serving development versions to the cluster for all open pull requestsfeat(k8s): Point Argo CD to Gitea for git and PR dev imagesdevops-cli-service commentedon Nov 18, 2026
The result in the alternatives block of the issue body changed. Before this check:
not-applicable, no tool. A person decides what the new result means for the item.Searches (10)
Tools considered:
Searches run:
Sources:
feat(k8s): Point Argo CD to Gitea for git and PR dev images (#1082)
feat(k8s): Point Argo CD to Gitea for git and PR dev images (#1082)
feat(k8s): Point Argo CD to Gitea for git and PR dev images (#1082)
devops-cli-service commentedon Nov 19, 2026
Released in v0.181.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.181.0
devops-cli-service commentedon Nov 19, 2026
Live since 2026-11-19 17:17 UTC