Skip to content

feat(k8s): let Argo Workflows run roadmap pods in devops #4566

Description

@dan-petty

Update 2026-11-26 (infra move): k8s/argo-workflows/ and k8s/argocd/ are in dan-petty/homelab now.

Here: the configurations fieldSpec, devops-cli-noop, the tests and checks of k8s/devops/, and RagIngestBehind in k8s/devops/monitoring/prometheus-rules-values.yaml. In homelab: the orphan glob (follow-up). The removal of devops-cli-version there is the homelab follow-up of #7141.

Conflict: #7141 moves devops-cli-version into k8s/devops/, and this item removes it. Decide one before a build.

Follow-up: dan-petty/homelab#269.


Problem or Motivation

The owner recorded the go verdict of ADR 0008 on #1535 on 2026-11-11. The roadmap jobs move onto Argo Workflows. Today:

  • The controller watches only argo-workflows (--namespaced, no managed namespace). The row pods need Secret devops-cli, the stack perimeter and the MCP server, which are in devops.
  • A WorkflowTemplate in Application devops gets no image digest: the kustomize image override does not reach spec.templates[].container.image (live rag-ingest shows the untagged image).
  • CronWorkflow rag-ingest uses the singular schedule field (live .spec.schedule: */3 * * * *), which Argo v4.0 removed (https://argo-workflows.readthedocs.io/en/latest/upgrading/). It has never run. CronWorkflow infra-drift (feat(infra): run drift in cluster and plan infra PRs #6977) has the same field (k8s/devops/cronworkflow-infra-drift.yaml:11).
  • The Argo CD orphan glob for Workflows is devops-cli-version-* (projects.yaml of k8s/argocd/, which is in dan-petty/homelab now), so unit Workflows would show as orphans.

Proposed Solution & Architectural Design

The refine split of 2026-11-14 applies, with four changes (owner approval of 2026-11-21). This item stays one item. It is not a tracker.

#5289 is the first slice. It moves the controller to devops (--namespaced --managed-namespace devops, with its Role and RoleBinding in devops), sets workflowRestrictions.templateReferencing: Strict, adds the executor ServiceAccount argo-executor, and fixes the rag-ingest fields. It also gives the rag-ingest template executor.serviceAccountName: argo-executor and a retryStrategy for exit 75, and adds one egress rule to the API server on TCP 6443 for each Workflow pod in devops (label workflows.argoproj.io/workflow). This item adds no 6443 rule of its own.

This item keeps these parts:

  • k8s/devops/kustomization.yaml: configurations: with the fieldSpec {path: spec/templates[]/container/image, kind: WorkflowTemplate}.
  • WorkflowTemplate devops-cli-noop in devops, with automountServiceAccountToken: false and executor.serviceAccountName: argo-executor.
  • A live test of the item mutex with a parameter name (item-<repo>-<n>), with two devops-cli-noop Workflows.
  • Two measurements: does a mutex wait count toward the deadline, and does a mutex wait survive a controller restart. If a mutex with a parameter name fails, the result names a Valkey lease for each item.
  • Remove the measurement template devops-cli-version, and name the no-op check in the Measurement section of k8s/README.md.
  • In dan-petty/homelab (dan-petty/homelab#269), not here: the Argo CD orphan glob for argoproj.io/Workflow becomes devops-cli-*.
  • A test that refuses the removed fields schedule, mutex and singular semaphore in each manifest under k8s/.
  • A CI check that runs argo lint on each WorkflowTemplate and CronWorkflow under k8s/.
  • The absent() branch of RagIngestBehind: the alert fires when its freshness series is missing.
  • Kustomization coverage: a test finds each manifest under k8s/devops/ in a kustomization.

These parts moved to other items. Each of those items needs this item, so none of them is a dependency of this item:

Target Subsystem

Kubernetes & Minikube Automation (k8s/devops/; k8s/argo-workflows/ and k8s/argocd/ are in dan-petty/homelab).

Existing Tool Considered

Argo Workflows features only (managed namespace, mutex, semaphore, retryStrategy, template restrictions). Cluster mode and a copy of Secret devops-cli in argo-workflows are the two options of ADR 0008; the managed namespace needs neither. Cost: about 240,000 tokens and 8 hours to build (140,000 for the engine, 100,000 for the names and labels), about 10,000 tokens a month to keep (chart bumps), about 20,000 tokens to fix.

Acceptance Criteria

Each as a devops k8s check, not a live pytest:

  • A no-op WorkflowTemplate devops-cli-noop in devops runs to Succeeded with the release digest.
  • The main container of devops-cli-noop has no service account token, and gets 401 or 403 at the API server.
  • Two devops-cli-noop Workflows of one item with the mutex item-<repo>-<n> do not run at the same time on the live controller.
  • For a Workflow that waits for a mutex, the result states if the wait counts toward its deadline, and if the wait keeps its place across a controller restart.
  • A queued Workflow under Strict starts the template spec of its creation or of its start; the result is stated.
  • Argo CD shows no orphan warning for the devops-cli-* Workflows (after dan-petty/homelab#269).
  • The removed-field test fails on a fixture with a removed field and passes on k8s/.
  • The argo lint check fails on a fixture with an unknown field and passes on k8s/.
  • A promtool test: RagIngestBehind fires when its freshness series is missing.

Dependencies

Source: #4517

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: Searches found the Argo Workflows engine the issue already names and uses; it supplies the managed namespace, template mutex and semaphore, retryStrategy and Strict template referencing, so the item adds only configuration, checks and monitoring glue.

Covers:

  • Controller with --managed-namespace devops and namespaced Role
  • Template-level mutex and semaphore with parameter names
  • retryStrategy and activeDeadlineSeconds on templates
  • workflowRestrictions templateReferencing Strict
  • Executor serviceAccountName and automountServiceAccountToken on pods

Lacks:

  • Removed-field check for schedule, mutex and singular semaphore
  • CI wiring that runs argo lint on each template
  • Kustomization coverage test for k8s/devops manifests
  • Prometheus absent() branch of RagIngestBehind
  • Argo CD orphan glob change to devops-cli-*

Owner decision 2026-11-13

The approved pipeline split (tracker #5482, Phase 4) uses one mutex for each item, item-<repo>-<n>, for every job of the item. Add a live test of a mutex with a parameter name. If it fails, use a Valkey lease for each item. Semaphores in roadmap-limits: agent 2, research 1, triage 1 and steward 1. No PriorityClass.

  • Live proof: after the merge, two Workflows of one item run as the App, and the second waits for the mutex. A comment gives the Workflow names and the times.

Proposed design

Problem statement

The roadmap jobs must run as Argo Workflows in namespace devops. #5289 moves the controller, adds the executor and fixes the rag-ingest fields. This item adds the kustomize fieldSpec for template images, WorkflowTemplate devops-cli-noop, the Measurement section entry and the absent() branch of RagIngestBehind. The Argo CD orphan glob and the removal of devops-cli-version are follow-ups outside this item. The Argo Workflows manifest gate checks are deferred to a new issue.

Acceptance criteria

Requirement: Template image fieldSpec

The kustomization k8s/devops/kustomization.yaml MUST add a configurations entry whose fieldSpec names path spec/templates[]/container/image and kind WorkflowTemplate.

Scenario: Rendered template image digest

  • WHEN uv run devops ci --check --only k8s renders k8s/devops with the release digest.
  • THEN The rendered devops-cli-noop template image ends with the release digest and not with the tag alone.

Requirement: No-op template identity

WorkflowTemplate devops-cli-noop in namespace devops MUST set automountServiceAccountToken: false and executor.serviceAccountName: argo-executor in its spec, and MUST be a resource of k8s/devops/kustomization.yaml.

Scenario: Rendered no-op template

  • WHEN uv run devops ci --check --only k8s renders k8s/devops.
  • THEN The rendered devops-cli-noop spec sets automountServiceAccountToken: false and executor.serviceAccountName: argo-executor, and the kustomization lists the template.

Requirement: Measurement section names no-op check

The Measurement section of k8s/README.md MUST name WorkflowTemplate devops-cli-noop as the no-op check.

Scenario: Docs row

  • WHEN uv run devops ci --check --only docs runs on the repository.
  • THEN The docs row passes and the Measurement section contains devops-cli-noop.

Requirement: RAG alert on absent series

The RagIngestBehind alert MUST fire when devops_cli_rag_ingest_last_success_timestamp_seconds has no series.

Scenario: No freshness series

  • WHEN promtool test rules evaluates a case with no devops_cli_rag_ingest_last_success_timestamp_seconds series.
  • THEN The RagIngestBehind rule produces an alert.

Requirement: Pending a person after the merge

After the merge, a person MUST record the live proof of the no-op template, the item mutex and the measurements in a comment on the issue.

Scenario: Owner live proof and measurements

  • WHEN The owner submits devops-cli-noop and two Workflows of one item with the mutex item-<repo>-<n>, holds the mutex and restarts the controller during a wait, and changes the template during a wait.
  • THEN The no-op Workflow ends Succeeded with the release digest, its main container gets 401 or 403 from the API server, the second Workflow waits for the first, and the comment holds the Workflow names and times, the deadline and restart answers, and the template spec that the queued Workflow started.

Existing Tool Considered

The alternatives check in the issue body records verdict in-use for argoproj/argo-workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, maintained. The block lists what the tool covers and lacks. This item supplies the configurations fieldSpec, WorkflowTemplate devops-cli-noop, the Measurement section entry and the absent() branch. The removed-field check, the argo lint wiring and the kustomization coverage test are deferred to a new issue. The orphan glob is a follow-up in dan-petty/homelab#269. The item writes no engine code.

Key questions

  • Which kustomize fieldSpec lets the release digest reach a WorkflowTemplate image in devops?: Add a configurations entry in k8s/devops/kustomization.yaml with a fieldSpec for path spec/templates[]/container/image and kind WorkflowTemplate. The images entry of Application devops then reaches each template image. (best practice) [sources: k8s/devops/kustomization.yaml, k8s/devops/workflowtemplate-rag-ingest.yaml]
    • Chosen: Kustomize fieldSpec. The Application images transformer reaches the template image through the fieldSpec.
    • Rejected: Image Updater. Image Updater acts on Applications, not on template fields.
    • Rejected: Untagged image. It leaves the template unpinned.
  • Which template and identity does the no-op measurement use?: Add WorkflowTemplate devops-cli-noop in devops with automountServiceAccountToken: false and executor.serviceAccountName: argo-executor. The executor ServiceAccount argo-executor comes from fix(k8s): the Argo controller manages namespace devops for rag-ingest #5289. (best practice) [sources: k8s/devops/kustomization.yaml, k8s/devops/workflowtemplate-rag-ingest.yaml, docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md]
    • Chosen: New devops-cli-noop template. It measures the no-op path and uses the narrow executor identity.
    • Rejected: Keep devops-cli-version. The version template is the homelab follow-up and is not part of this item.
    • Rejected: No-op with the default service account. The main container would mount a token, and the executor would lose its narrow identity.
  • Should RagIngestBehind fire when its freshness series is absent?: Add an absent() branch to RagIngestBehind, as ClusterMetricsMissing uses. Add a promtool case with no freshness series. (best practice) [sources: k8s/devops/monitoring/prometheus-rules-values.yaml, tests/infra/test_nodes.py]
    • Chosen: Add an absent-series branch. The rule fires when the metric has no series, as ClusterMetricsMissing does.
    • Rejected: Leave the rule as it is. With no series the expression gives no result, so the alert cannot fire.
    • Rejected: Rely on a manual check. No alert tells a person.
  • Which mutex and semaphore values bound the roadmap Workflows, and does a priority order apply?: Use one mutex for each item, item-<repo>-<n>, for every job of the item. Set the semaphores agent 2, research 1, triage 1 and steward 1 in ConfigMap roadmap-limits of feat(k8s): let roadmap-service create Argo Workflows #6592. Add no PriorityClass. This item tests the parameter mutex on the live controller. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md, docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md]
    • Chosen: Owner values of 2026-11-13. The owner recorded the per-item mutex, the four semaphore values and no PriorityClass.
    • Rejected: PriorityClass for the fix units. The owner decision of 2026-11-13 refuses a PriorityClass.
    • Rejected: Higher semaphore values. No capacity measurement supports them.
  • How does this item handle the conflict with build(k8s): move workflowtemplate-version.yaml into the product base #7141 over devops-cli-version?: This item removes no devops-cli-version template. build(k8s): move workflowtemplate-version.yaml into the product base #7141 owns the move of that template into k8s/devops/, and its homelab follow-up owns the removal. This item adds only devops-cli-noop. (best practice) [sources: k8s/devops/kustomization.yaml]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#5289

Moved to new items

#7585

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/k8s
    status/new
    value/high
    effort/high
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    The proposal at 4330ee4 needs splitting into 3 items. A person splits the item into the items below, or replies in a comment or edits the body to keep one item, and the next refine round looks at the item again.

    1. feat(k8s): let roadmap-service create Argo Workflows - add create, get, list and delete on workflows to its Role, the ValidatingAdmissionPolicy that admits only a workflowTemplateRef named roadmap-* and arguments, and ConfigMap roadmap-limits with agent 2 and triage 2; it needs this item.
    2. feat(k8s): run the stage job as a WorkflowTemplate - add roadmap-stage with the template-level mutex stage-<owner>.<name>-<n>, semaphore agent, retryStrategy (exit 75, limit 2, 30 s, factor 2) and activeDeadlineSeconds, and the unit names and labels of ADR 0022; it needs feat(roadmap): label Service Jobs by repository and item #4558, feat(roadmap): run each stage item in its own Job #4559 and this item.
    3. feat(monitoring): alert on Argo Workflows in devops - add the controller up == 0, failed-Workflow and Pending-queue-age alerts, the OTLP series budget, and the API-server and series measurement; it needs "feat(monitoring): record the shared roadmap Service selectors" and this item.
  6. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Scope from the project brain plan (2026-11-11)

    The project brain plan #4624 folds one fix into this item (child 6 of that plan). The brain CronWorkflows brain-daily and brain-weekly (#4687, #4693) depend on this item.

    Problem: k8s/devops/workflowtemplate-rag-ingest.yaml:11-13 uses synchronization.mutex, and k8s/devops/cronworkflow-rag-ingest.yaml:10 uses schedule. Argo Workflows v4.0 removed both (Argo Workflows upgrade notes). ADR 0021 plans only the schedules change. CronWorkflow rag-ingest has no lastScheduledTime and 0 Workflows (measured).

    Added scope:

    • Change mutex to mutexes in the rag-ingest template, in addition to the schedules change that this item already holds.
    • Add a test that refuses the removed fields (schedule, mutex and semaphore in the singular) in any manifest under k8s/.

    Added acceptance criteria:

    • The test fails on a fixture manifest with a removed field and passes on k8s/.
    • After this item merges, kubectl get cronworkflow rag-ingest -n devops shows a lastScheduledTime.

    The dependencies do not change: #4527, #4533, #4558, #4559. This item stays a child of #4517.

  7. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Scope from the iteration lane plan (2026-11-11)

    This issue stays a child of #4517. It is also child 17 of #4667. The scope adds:

    • Move the gate WorkflowTemplate of feat(k8s): add the CI gate WorkflowTemplate #4691 with the namespace.
    • Exclude the gate pods from devops-default-perimeter. After the move, the default perimeter would let test code reach the gateway, Valkey and OTel.
    • Rename the Argo CD orphan glob to devops-cli-*.
    • After this issue, a narrow kube identity can submit the gates (owner decision OD7).

    Acceptance added:

    • After the move, a test proves that a gate pod cannot reach the gateway or Valkey.
    • One live gate passes in devops.

    Depends on: #4691.

  8. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Evidence: the RAG ingest lane has never run, and no alert shows it (2026-11-11)

    A standards inventory found this problem again. I confirmed it with read-only kubectl reads and Prometheus queries.

    • k8s/devops/cronworkflow-rag-ingest.yaml:5 puts CronWorkflow rag-ingest in namespace devops. k8s/argo-workflows/values.yaml:26 sets singleNamespace: true. The live controller runs with --namespaced and with no --managed-namespace, so it watches only argo-workflows.
    • The live CronWorkflow rag-ingest exists since 2026-11-08T20:34Z. It has no status.lastScheduledTime. No namespace has a Workflow.
    • Prometheus has no series of devops_cli_rag_ingest_last_success_timestamp_seconds in its 30 days of retention.
    • The alert RagIngestBehind (k8s/monitoring/prometheus-values.yaml:1073) is time() - max by (repo) (devops_cli_rag_ingest_last_success_timestamp_seconds) > 360. With no series, the expression gives no result, so the alert cannot fire. The lane does not run, and no alert tells a person.

    Proposed addition to the acceptance criteria:

    • The alert also fires when the series is absent, as ClusterMetricsMissing does with absent(...). A test of the rule shows that it fires with no series.
    • After the move, kubectl -n devops get cronworkflow rag-ingest shows a lastScheduledTime, and the success metric has one series for each indexed repository.

    Related: #4135 and #3949 verify the schedule and the index. They cannot pass before this item.

  9. devops-cli-service commented on Nov 12, 2026

    @devops-cli-service
    Contributor

    The proposal at c3130a3 needs splitting into 4 items. A person splits the item into the items below, or replies in a comment or edits the body to keep one item, and the next refine round looks at the item again.

    1. feat(k8s): let roadmap-service create Argo Workflows - add create, get, list and delete on workflows to its Role, the ValidatingAdmissionPolicy that admits only a workflowTemplateRef named roadmap-* and arguments, and ConfigMap roadmap-limits with agent 2 and triage 2; it needs this item.
    2. feat(k8s): run the stage job as a WorkflowTemplate - add roadmap-stage with the template-level mutex stage-<owner>.<name>-<n>, semaphore agent, retryStrategy (exit 75, limit 2, 30 s, factor 2) and activeDeadlineSeconds, and the unit names and labels of ADR 0022; it needs feat(roadmap): label Service Jobs by repository and item #4558, feat(roadmap): run each stage item in its own Job #4559 and this item.
    3. feat(k8s): move the gate WorkflowTemplate to devops - move the gate template of feat(k8s): add the CI gate WorkflowTemplate #4691, exclude its pods from devops-default-perimeter, and add the gate perimeter test; it needs feat(k8s): add the CI gate WorkflowTemplate #4691 and this item.
    4. feat(monitoring): alert on Argo Workflows in devops - add the controller up == 0, failed-Workflow and Pending-queue-age alerts, the absent-series RagIngestBehind rule, the OTLP series budget, and the API-server and series measurement; it needs "feat(monitoring): record the shared roadmap Service selectors" and this item.
  10. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor

    Scope from the cluster integration plan (2026-11-12)

    The cluster integration plan #4989 gives this item one more part: rank 12, a schedule guard for CronWorkflows. This issue stays a child of #4517.

    1. Turn on kube-state-metrics customResourceState for the argoproj.io CronWorkflow: telemetryServices.kube-state-metrics.customResourceState in k8s-monitoring 4.5.2. KSM 8.4.2 makes the ClusterRole rule through rbac.customResourceState.createClusterRoleRules.
    2. Add one rule: a CronWorkflow that is not suspended has no lastScheduledTime newer than 2 periods.
    3. Add a promtool case for a CronWorkflow with no status.

    The failed-Workflow and RAG absent-series alerts stay with this issue and #4577.

    Why: the controller metrics count only what the controller watches. So a CronWorkflow outside its scope never runs and gives no signal. rag-ingest was created on 2026-11-08 and was never scheduled. The guard reads the Kubernetes object, so it covers each future CronWorkflow (#4821, #4809, #3908, #4574). This issue suspends rag-ingest, so the guard has no target until a second schedule exists. If this part makes the item too large, file it after this item merges.

  11. 52 remaining items

  12. added
    status/new
    and removed
    status/ready
    owner/service
    on Nov 29, 2026
  13. added
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 30, 2026
  14. added
    status/in-review
    and removed
    status/in-progress
    on Nov 30, 2026
  15. removed
    status/in-review
    owner/agent
    on Nov 30, 2026
  16. devops-cli-service commented on Nov 30, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-30 20:54 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/highpriority/p1-highscope/k8ssource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions