Repository navigation
Description
Update 2026-11-26 (infra move): the Argo Workflows values are now in dan-petty/homelab.
- The controller mode (
--namespaced,--managed-namespace devops, Role, executor ServiceAccount) is a follow-up issue there. - This issue keeps the
rag-ingestmanifests, the NetworkPolicy, the check and the ADR line. - Merge the two parts in step with each other.
Follow-up: dan-petty/homelab#320.
Problem or Motivation
Child 16 of the ADR modernization (#5233). Code. It is the first slice of #4566, which ADR 0021:32 decided, so it needs no new decision.
The review of each record that this item changes:
- ADR 0008 (amend now; an engine record supersedes it in the PR that ships the last slice of feat(k8s): let Argo Workflows run roadmap pods in devops #4566): The engine choice and the go hold (feat(k8s): the argo workflows controller runs in its own namespace under argo cd and deploy-stack, and a --version workflow measures start-up and api-server load for the go/no-go on moving the roadmap jobs onto it #1535, warm p95 11 s). The pins, 'replicas 0', 'no argo-server' and singleNamespace are stale. Its Considered Options hold the engine rejections (RQ, Temporal, Celery), which the successor must restate.
- ADR 0021 (amend (Status History and two amending records)): The direction holds (owner, 2026-11-11), but only 2 of its 15 steps are built, and it grew from 3,585 to 7,472 words in 2 days. New rows go to their OpenSpec change and the step order to feat(roadmap): move Service work to Workflows and Valkey #4517. Caps become settings, cache keys fall back, and coordination keys fail closed.
Proposed Solution & Architectural Design
In k8s/argo-workflows/values.yaml of dan-petty/homelab (follow-up issue): --namespaced and --managed-namespace devops with a Role, templateReferencing Strict and the executor ServiceAccount. rag-ingest uses schedules and mutexes. An offline test refuses schedule, mutex and the singular semaphore. Add a Status History line to 0008. The engine record that supersedes 0008 comes with the last slice of #4566.
So that rag-ingest runs to the end, this item also adds these parts (split of #4566, owner approval of 2026-11-21):
executor.serviceAccountName: argo-executoron therag-ingestWorkflowTemplate. Its pods run asdevops-cli, which mounts no service account token, so without it the executor cannot write the task results.- One egress rule to the API server on TCP 6443 for each Workflow pod in
devops(labelworkflows.argoproj.io/workflow). The executor of each Workflow pod writes the task results through the API, anddevops-default-perimeterhas no 6443 egress. - A
retryStrategyfor exit 75 on therag-ingesttemplate.
With these three parts, rag-ingest can run, so this item does not suspend it. Until an item has these parts, rag-ingest keeps suspend: true. Fact of 2026-11-27: on main, k8s/devops/cronworkflow-rag-ingest.yaml has no suspend field. CronWorkflow infra-drift has the same singular schedule field; #7364 holds that change.
Rules of the ADR process (docs/adr/README.md, #5225) that apply:
- Use one form for a Status History line, 30 words at most: 'YYYY-MM-DD: Amended by ADR NNNN, section S | Amended by the owner decision in #N, section S | Superseded by ADR NNNN | Fact out of date: (#N) | Living detail moved to (#PR).' The PR that makes a fact of a record wrong adds the line (AGENTS.md rule 8). An agent never edits the body of an accepted record.
Keep these constraints on purpose. The review found a reason for each one:
- ADR 0003/0017/0021, the sweep is the source of truth and 'webhooks as the only trigger' stays rejected: 25 of 100 deliveries got 403, and about 116 s are lost at each rollout.
- ADR 0021, coordination keys fail closed (shared request window, holds, identity halt, locks): a local fallback would let N pods pass the owner's cap.
- ADR 0008, one namespaced controller with a Role and never a ClusterRole, plus minimal CRDs with an offline schema check.
Target Subsystem
The Argo Workflows Helm values (in dan-petty/homelab), k8s/devops/cronworkflow-rag-ingest.yaml, k8s/devops/workflowtemplate-rag-ingest.yaml, k8s/devops/networkpolicy.yaml, docs/adr/.
Existing Tool Considered
The namespaced mode of the Argo Workflows controller (--namespaced, --managed-namespace) in the Helm values. No new tool.
Acceptance Criteria
- Done in dan-petty/homelab (dan-petty/homelab#320, merged as dan-petty/homelab#418 on 2026-11-27), not here: the Helm values set
--namespacedand--managed-namespace devopswith a Role and no ClusterRole,templateReferencing: Strictand the executor ServiceAccount. - rag-ingest uses
schedulesandmutexes. An offline test refuses the singularschedule,mutexandsemaphore. - After the sync, one rag-ingest Workflow runs to the end in namespace
devops. - ADR 0008 gets a Status History line. The engine record that supersedes ADR 0008 comes with the last slice of feat(k8s): let Argo Workflows run roadmap pods in devops #4566.
Dependencies
This item adds a Status History line to the ADR 0008 file of #5225.
Related
- Tracker: docs(adr): track the ADR modernization #5233. Review source:
docs/adr/at e413c40. - Split from feat(k8s): let Argo Workflows run roadmap pods in devops #4566: this is its first slice. feat(roadmap): move Service work to Workflows and Valkey #4517 holds the step order.
Source: #5233
Alternatives check of 2026-11-25: in-use.
The repository already uses this tool.
Tool: argoproj/argo-workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, last activity 2026-11-25, maintained.
Reason: The searches found Argo Workflows, the engine the cluster already runs, whose namespaced controller mode, Role-scoped install, Strict template referencing, executor ServiceAccount and retry strategies cover the issue's need; the remaining gaps are repository-local.
Covers:
- Namespaced controller mode with --namespaced and --managed-namespace, Role only
- Strict template referencing from the controller
- Separate executor ServiceAccount for task result writes
- Plural schedules on CronWorkflow and synchronization mutexes
- Step-level retryStrategy with exit-code expressions
- Scheduled cron workflows and parallelism limits
Lacks:
- Offline k8s check row that refuses singular schedule, mutex, semaphore
- NetworkPolicy egress to the API server on TCP 6443 for Workflow pods
- ADR 0008 Status History line and live end-to-end run proof
Proposed design
Problem statement
Fix the rag-ingest manifests, the NetworkPolicy, the k8s check and the ADR 0008 line. The namespaced Argo controller will manage namespace devops after dan-petty/homelab#418 merges. Controller v4.1.7 refuses the singular schedule field and ignores mutex. The executor has no service account, and the Workflow pods have no API server egress on TCP 6443. No retry covers exit 75. The live proof waits on dan-petty/homelab#418, and a person runs it after the merge.
Acceptance criteria
Requirement: rag-ingest-plural-schedules
The rag-ingest CronWorkflow SHALL set schedules to a list and MUST NOT set schedule.
Scenario: The k8s check accepts the CronWorkflow
- WHEN
uv run devops ci --check --only k8sruns on the change. - THEN The command exits zero and prints no finding for
k8s/devops/cronworkflow-rag-ingest.yaml.
Requirement: rag-ingest-plural-mutexes
The rag-ingest WorkflowTemplate SHALL set synchronization.mutexes and MUST NOT set mutex or semaphore.
Scenario: The k8s check accepts the WorkflowTemplate
- WHEN
uv run devops ci --check --only k8sruns on the change. - THEN The command exits zero and prints no finding for
k8s/devops/workflowtemplate-rag-ingest.yaml.
Requirement: k8s-check-refuses-singular-fields
The k8s check MUST fail when a rag-ingest manifest sets schedule, mutex or semaphore.
Scenario: The check row refuses a singular field
- WHEN
uv run devops ci test tests/k8s/test_k8s_catalog.pyruns the cases that give the row a manifest withschedule,mutexorsemaphore. - THEN The cases pass and the row reports one finding that names the singular field.
Requirement: rag-ingest-executor-service-account
The rag-ingest WorkflowTemplate SHALL set spec.executor.serviceAccountName to argo-executor.
Scenario: The k8s check accepts the executor account
- WHEN
uv run devops ci --check --only k8sruns on the change. - THEN The command exits zero and prints no finding for
k8s/devops/workflowtemplate-rag-ingest.yaml.
Requirement: workflow-pods-reach-the-api-server
The devops network policies SHALL admit one egress rule on TCP 6443 to the API server for the pods that carry the label workflows.argoproj.io/workflow.
Scenario: The k8s check accepts the API server egress rule
- WHEN
uv run devops ci --check --only k8sruns on the change. - THEN The command exits zero and prints no finding for
k8s/devops/networkpolicy.yaml.
Requirement: rag-ingest-retries-exit-75
The ingest template of the rag-ingest WorkflowTemplate MUST set a retryStrategy that retries exit code 75 and stops after three retries.
Scenario: The k8s check accepts the retry rule
- WHEN
uv run devops ci --check --only k8sruns on the change. - THEN The command exits zero and prints no finding for
k8s/devops/workflowtemplate-rag-ingest.yaml.
Requirement: adr-0008-status-history-line
ADR 0008 MUST get one dated Status History line in the Fact out of date form, and its body MUST stay unchanged.
Scenario: The ADR test accepts the status history line
- WHEN
uv run devops ci test tests/invariants/test_adr_records.pyruns on the amended ADR 0008. - THEN The test passes and the body-hash check reports no change.
Requirement: Pending a person after the merge
After this item merges and releases, and after dan-petty/homelab#418 merges and Argo CD syncs, one rag-ingest Workflow MUST run to completion in namespace devops.
Scenario: The live rag-ingest Workflow succeeds
- WHEN The next rag-ingest schedule starts a Workflow, and a person runs
kubectl -n devops get workflow -l workflows.argoproj.io/cron-workflow=rag-ingest -o jsonpath='{.items[*].status.phase}'. - THEN The command prints
Succeeded.
Existing Tool Considered
argoproj/argo-workflows (https://github.com/argoproj/argo-workflows), verdict in-use. The alternatives check in the issue body gives what the tool covers and lacks. This proposal uses the executor ServiceAccount, plural schedules and mutexes, and the retryStrategy. It adds the repository-local parts that the check lists as lacking: the offline k8s check row, the API server egress rule on TCP 6443, the ADR 0008 Status History line and the live end-to-end proof. The controller mode itself comes from dan-petty/homelab#320.
Key questions
- Which synchronization fields do the rag-ingest manifests use?: Use
scheduleson the CronWorkflow andsynchronization.mutexeson the WorkflowTemplate. Removeschedule,mutexandsemaphore. (best practice) [sources: k8s/devops/cronworkflow-rag-ingest.yaml, k8s/devops/workflowtemplate-rag-ingest.yaml]- Chosen: Plural
schedulesandmutexes. Controller v4.1.7 refuses a CronWorkflow withscheduleasSpecErrorand does not readmutex. The plural fields carry the list that the controller reads. - Rejected: Keep the singular fields. The controller refuses or ignores them, so the CronWorkflow does not run and the mutex does not hold.
- Chosen: Plural
- How does the k8s check refuse the singular synchronization fields?: Add a row to the k8s check catalog that fails on
schedule,mutexorsemaphorein the rag-ingest manifests. Prove it with a unit test of the row and withuv run devops ci --check --only k8s. (best practice) [sources: src/devops_cli/k8s/catalog.py, tests/k8s/test_k8s_catalog.py, k8s/devops/cronworkflow-rag-ingest.yaml]- Chosen: A k8s check row. A validator checks a manifest. The issue asks for an offline refusal.
- Rejected: A pytest test that reads the manifest. A test asserts no value of a manifest. The k8s check row is the validator that does.
- Rejected: No offline check. The issue requires the offline refusal.
- How does the executor write the task results?: Set
spec.executor.serviceAccountName: argo-executoron the rag-ingest WorkflowTemplate. The homelab change makes ServiceAccountargo-executor, its token Secret and a Role forcreateandpatchonworkflowtaskresults. This repository adds no account and no Secret. (best practice) [sources: k8s/devops/workflowtemplate-rag-ingest.yaml]- Chosen: Set
executor.serviceAccountNametoargo-executor. The pod runs asdevops-cli, which mounts no token. The executor needs its own account to write the task results. - Rejected: Mount the token on the
devops-clipod. It gives the ingest container the rights of thedevops-cliServiceAccount, which the workload does not need. - Rejected: Leave the executor with no account. The executor cannot write the task results, so the Workflow fails.
- Chosen: Set
- Which network policy admits the API writes of the executor?: Add one dedicated egress policy in
k8s/devops/networkpolicy.yaml. It selects the pods that carry the labelworkflows.argoproj.io/workflowand admits TCP 6443 to the API server. (best practice) [sources: k8s/devops/networkpolicy.yaml]- Chosen: A dedicated egress policy for the Workflow pods. Only the Workflow pods need API egress. The other pods of
devopskeep the perimeter rules. - Rejected: Add TCP 6443 to
devops-default-perimeter-egress. It gives every pod ofdevopsAPI egress, including the pods that must not have it. - Rejected: No egress rule. The perimeter has no 6443 egress, so the executor cannot reach the API server.
- Chosen: A dedicated egress policy for the Workflow pods. Only the Workflow pods need API egress. The other pods of
- Which retry rule covers exit code 75?: Set
retryStrategyon the ingest template withexpression: asInt(lastRetry.exitCode) == 75andlimit: "3". (best practice) [sources: k8s/devops/workflowtemplate-rag-ingest.yaml]- Chosen: Retry exit 75 only. The roadmap uses exit 75 for try again later. Only that code retries.
- Rejected: Retry on any failure. A defect retries three times and delays the alert.
- Rejected: No retry. A temporary failure fails the Workflow.
- How does ADR 0008 record the stale controller facts?: Add one dated Status History line in the
Fact out of dateform. Do not edit the body. (best practice) [sources: docs/adr/README.md, AGENTS.md, tests/invariants/test_adr_records.py]- Chosen: One Status History line.
docs/adr/README.mdand AGENTS.md rule 8 allow only a dated line for an accepted record. - Rejected: Edit the ADR body in place. The body-hash test fails. An agent never edits the body of an accepted record.
- Rejected: Write the superseding engine record now. The issue gives that record to the last slice of feat(k8s): let Argo Workflows run roadmap pods in devops #4566.
- Chosen: One Status History line.
- Does this item amend ADR 0021?: No. This item adds the ADR 0008 line only. The update of 2026-11-26 keeps the ADR line, and the Proposed Solution names ADR 0008. (best practice) [sources: docs/adr/README.md, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md]
- Chosen: Change ADR 0008 only.
docs/adr/README.mdputs a value, a cap and a table row in the OpenSpec change, not in a record. feat(roadmap): move Service work to Workflows and Valkey #4517 holds the step order. - Rejected: Amend ADR 0021 in this pull request. The update of 2026-11-26 narrows the item to the ADR 0008 line, and this change makes no fact of ADR 0021 wrong.
- Chosen: Change ADR 0008 only.
- How is the end-to-end run of rag-ingest proved?: A person runs
kubectl -n devops get workflow -l workflows.argoproj.io/cron-workflow=rag-ingest -o jsonpath='{.items[*].status.phase}'after this item releases anddan-petty/homelab#418merges. The command showsSucceeded. (best practice) [sources: k8s/devops/cronworkflow-rag-ingest.yaml, k8s/devops/workflowtemplate-rag-ingest.yaml]- Chosen: A live check after the merge. Only the cluster shows that a Workflow ran to the end in
devops. - Rejected: An offline test. A test asserts no result of a Workflow run.
- Chosen: A live check after the merge. Only the cluster shows that a Workflow ran to the end in
- Does the change need a new tool or library?: No. The repository already uses Argo Workflows. The alternatives check gives verdict in-use. (best practice) [sources: k8s/devops/cronworkflow-rag-ingest.yaml]
- Chosen: Keep Argo Workflows. The cluster already runs the controller. The namespaced mode covers the namespace scope.
- Rejected: Add a new tool. No open tool covers the need better than the controller that the cluster runs.
- Does this item change the
infra-driftCronWorkflow?: No. The item names the rag-ingest manifests only. A new issue movesk8s/devops/cronworkflow-infra-drift.yamltoschedulesand gives it the executor account and the API egress. That issue must merge beforedan-petty/homelab#418. (best practice) [sources: k8s/devops/cronworkflow-infra-drift.yaml, k8s/devops/cronworkflow-rag-ingest.yaml]- Chosen: Defer the infra-drift change to a new issue. The update of 2026-11-26 keeps the rag-ingest manifests only. The same controller change breaks
infra-drift, so it needs its own item. - Rejected: Change both CronWorkflows in this pull request. The update names the rag-ingest manifests only, and AGENTS.md rule 1 gives one item one pull request.
- Chosen: Defer the infra-drift change to a new issue. The update of 2026-11-26 keeps the rag-ingest manifests only. The same controller change breaks
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 13, 2026
Both configure Argo Workflows in the devops namespace, but the candidate is the first slice (controller namespace and Role) while #4566 is the umbrella covering all roadmap pod work.dan-petty commentedon Nov 16, 2026
The service pattern audit of 2026-11-16 (#6059) confirms this item, and it found two more gaps of
rag-ingest. Fix them with this item, because the Workflow does not run before this item:kubectl get cronworkflow rag-ingest -n devopsshowslastScheduledTimenull, and namespacedevopshas no Workflow. The controller runs withsingleNamespace: true(k8s/argo-workflows/values.yaml), so it watches onlyargo-workflows.k8s/devops/workflowtemplate-rag-ingest.yamlhas no tag and no digest, withimagePullPolicy: IfNotPresent, also in the live object. Argo CD Image Updater sets the digest of the Service image through the Kustomize images of Applicationdevops, and Kustomize does not rewrite the image field of a WorkflowTemplate. So a node can run an old image for a long time (service pattern SC5).retryStrategy. Service pattern JB4 asks for a retry of exit 75 and of the faults of the infrastructure only.devops-cli-service commentedon Nov 17, 2026
Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.
devops-cli-service commentedon Nov 19, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (8)
Tools considered:
Searches run:
Sources:
42 remaining items
test(k8s): refuse the singular Argo fields in the k8s row (#5289)
test(k8s): run the offline lint of Argo in the k8s row (#5289)
ci: copy argo of the devtools image for the k8s row (#5289)
fix(k8s): run rag-ingest on Argo Workflows v4 (#5289)
docs(adr): record the namespaced controller in ADR 0008 (#5289)
docs(k8s): name the offline lint of Argo in the k8s row (#5289)
docs(spec): archive the change of #5289
devops-cli-service commentedon Nov 27, 2026
Released in v0.226.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.226.0
devops-cli-service commentedon Nov 27, 2026
Live since 2026-11-27 18:39 UTC
dan-petty commentedon Nov 27, 2026
Live proof, 2026-11-27, release 0.228.2 (Application
devopssynced at 18:28 UTC):rag-ingest-1795804020ran from 18:27:00 to 19:40:30 UTC and endedSucceeded, with exit 0 and no retry. The executor wrote its task results withargo-executorthroughargo-workflow-egress(fix(k8s): run infra-drift on Argo v4 with API server egress #7410).rag-ingest-1795808520, at 19:42:00 UTC, 90 seconds after the first ended.The criterion passes. A new defect: each run embeds every file again, because the cache of the indexer is on an
emptyDir; #7467 holds it.