Repository navigation
Description
Update 2026-11-26 (infra move): k8s/argo-workflows/ is in dan-petty/homelab now.
The Role, the admission policy and ConfigMap roadmap-limits of this item stay in k8s/devops/. The controller values that must manage namespace devops first are in homelab (#5289, #4566).
Problem
The refine split of #4566 on 2026-11-14 gives this part its own item. Today the Service cannot create Argo Workflows in devops. Its Role has no rule for workflows, and no admission policy limits what it submits.
The owner live proof of 2026-11-13 on #4566 needs the Service to submit Workflows as the App. So the proof is in this item, not in #4566.
Scope
- Give the Role of
roadmap-servicethe verbscreate,get,listanddeleteonworkflows. - Add a ValidatingAdmissionPolicy in the form of
admissionpolicy.yaml(feat(k8s): an admission policy pins the Jobs the roadmap Service may create #2696). Fromroadmap-service, it admits only a Workflow whosespecholds onlyworkflowTemplateRef(nameroadmap-*) andarguments. - Add ConfigMap
roadmap-limitswith the semaphoresagent2,research1,triage1 andsteward1 (owner decision of 2026-11-13 on feat(k8s): let Argo Workflows run roadmap pods in devops #4566).
Acceptance criteria
Each as a live check, not a live pytest:
- A Workflow with an inline
spec.templatesfrom ServiceAccountroadmap-serviceis refused. - A change of
roadmap-limitsapplies to the next Workflow. - Live proof (owner, 2026-11-13): after the merge, two Workflows of one item run as the App, and the second waits for the item mutex
item-<repo>-<n>. A comment on this issue gives the Workflow names and the times.
Dependencies
Source
Source: #4517
Alternatives check of 2026-11-21: 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-21, maintained.
Reason: Argo Workflows' own controller controls cover part of the need: secure template referencing refuses inline templates and semaphore ConfigMaps hold the limits, but ADR 0021 rejected secure mode, and the Role verbs and per-ServiceAccount rule stay in-repo.
Covers:
- Controller setting can require a workflowTemplateRef instead of inline templates
- Semaphore and mutex ConfigMaps hold the per-lane concurrency limits
- WorkflowTemplate keeps the pod spec out of the submitter's request
Lacks:
- No per-ServiceAccount admission; secure mode applies to every submitter
- No Role verbs; create, get, list and delete are Kubernetes RBAC
- Secure mode fails running Workflows at each release, so ADR 0021 rejected it
- No check on the template name prefix roadmap-*
Proposed design
Problem statement
The roadmap Service cannot create Argo Workflows in devops: its Role has no rule for workflows.argoproj.io, and no admission policy limits what it submits. This item gives the Role create, get, list and delete, adds a per-ServiceAccount ValidatingAdmissionPolicy that admits only a roadmap-* workflowTemplateRef with arguments, and adds the roadmap-limits semaphore ConfigMap. The owner live proof of 2026-11-13 on #4566 needs the Service to submit Workflows as the App, so this item carries that proof.
Acceptance criteria
Requirement: Workflow role verbs
The roadmap-service Role SHALL grant the verbs create, get, list and delete on workflows.argoproj.io in namespace devops.
Scenario: ServiceAccount can use the workflow verbs
- WHEN Run
for verb in create get list delete; do kubectl auth can-i "$verb" workflows.argoproj.io --as=system:serviceaccount:devops:roadmap-service -n devops; done. - THEN The command prints
yesfour times.
Requirement: Only a template reference in the spec
The ValidatingAdmissionPolicy SHALL refuse a Workflow from ServiceAccount roadmap-service whose spec holds any key other than workflowTemplateRef and arguments.
Scenario: Inline template denied
- WHEN Run
kubectl create --dry-run=server --as=system:serviceaccount:devops:roadmap-service -n devops -f tests/fixtures/workflows/inline-template.yaml. - THEN The command exits non-zero and prints a denial that names
roadmap-service-workflows.
Requirement: Roadmap template reference admitted
The ValidatingAdmissionPolicy SHALL admit a Workflow from ServiceAccount roadmap-service whose spec holds only workflowTemplateRef with a name that starts with roadmap- and optional arguments.
Scenario: Allowed template reference
- WHEN Run
kubectl create --dry-run=server --as=system:serviceaccount:devops:roadmap-service -n devops -f tests/fixtures/workflows/roadmap-template-ref.yaml. - THEN The command exits 0 and prints
workflow.argoproj.io/roadmap-template-ref created (server dry run).
Requirement: Non-roadmap template prefix refused
The ValidatingAdmissionPolicy SHALL refuse a Workflow from ServiceAccount roadmap-service whose workflowTemplateRef name does not start with roadmap-.
Scenario: Wrong template prefix denied
- WHEN Run
kubectl create --dry-run=server --as=system:serviceaccount:devops:roadmap-service -n devops -f tests/fixtures/workflows/other-template-ref.yaml. - THEN The command exits non-zero and prints a denial that names
roadmap-service-workflows.
Requirement: Roadmap limits values
The ConfigMap roadmap-limits SHALL hold the semaphores agent with value 2, research with value 1, triage with value 1 and steward with value 1.
Scenario: Semaphore values
- WHEN Run
kubectl get configmap roadmap-limits -n devops -o json | jq -c '.data'. - THEN The command prints
{"agent":"2","research":"1","steward":"1","triage":"1"}.
Requirement: Semaphore change applies to the next Workflow
A change to the agent value in roadmap-limits SHALL apply to the next Workflow that uses the agent semaphore.
Scenario: Agent semaphore lowered to one
- WHEN Set
agentto1inroadmap-limits, create two Workflows assystem:serviceaccount:devops:roadmap-servicefrom theroadmap-*template that uses theagentsemaphore, each with the labelroadmap.devops-cli/item=<n>, and runkubectl get workflows.argoproj.io -n devops -l roadmap.devops-cli/item=<n> -o jsonpath='{range .items[*]}{.status.phase}{"\n"}{end}' | sort | uniq -c. - THEN The command prints one
Pendingline and oneRunningline.
Requirement: Owner live proof of two Workflows
The Service SHALL submit two Workflows of one item as the App, and the second Workflow SHALL wait for the item mutex item-<owner>.<name>-<n>.
Scenario: Two Workflows of one item
- WHEN After the merge, the owner runs one item and comments the two Workflow names and times on this issue.
- THEN The comment shows the two Workflows run as the App, and the second waits for
item-<owner>.<name>-<n>.
Existing Tool Considered
Argo Workflows (https://github.com/argoproj/argo-workflows), Apache-2.0, last activity 2026-11-21, is in use; the alternatives block of the issue body (2026-11-21) gives the verdict in-use and its Lacks: list. This item keeps the controller and adds the Role verbs, the per-ServiceAccount ValidatingAdmissionPolicy and the roadmap-limits ConfigMap.
Key questions
- Which admission mechanism should enforce the Workflow spec shape?: Use a Kubernetes ValidatingAdmissionPolicy with standard CEL. It runs in the API server and needs no extra controller or webhook, and the repository already uses this mechanism for the Service's Jobs. Kyverno adds a controller and CRDs, and Argo Workflows secure mode is rejected by ADR 0021. (best practice) [sources: openspec/changes/archive/2026-10-30-2696-job-admission-policy/design.md:5, docs/SERVICE_PATTERNS.md:75, docs/guidelines/production-readiness.md:128, k8s/devops/roadmap-service/admissionpolicy.yaml:28]
- Chosen: ValidatingAdmissionPolicy. It is built into the API server, needs no extra controller, and is the mechanism the Job policy already uses.
- Rejected: Kyverno policy. It adds a controller and CRDs for one policy.
- Rejected: Argo Workflows secure template referencing. ADR 0021 rejected secure mode because it fails running Workflows at each release.
- How should the policy limit the Workflow
spectoworkflowTemplateRefandarguments?: Add ValidatingAdmissionPolicyroadmap-service-workflows, bound by a binding of the same name tosystem:serviceaccount:devops:roadmap-service, and allow-list the top-levelspeckeys with standard CEL:has(object.spec.workflowTemplateRef) && has(object.spec.workflowTemplateRef.name) && object.spec.workflowTemplateRef.name.startsWith('roadmap-') && size(object.spec) == 1 + (has(object.spec.arguments) ? 1 : 0). ThematchConditionskeep another submitter out of the evaluation, and the expression uses onlyhas,size,startsWithand operators, which the repository's offline CEL gate check can run. (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:70, docs/SERVICE_PATTERNS.md:75, openspec/changes/archive/2026-10-30-2696-job-admission-policy/design.md:19, k8s/devops/roadmap-service/admissionpolicy.yaml:45]- Chosen: Allow-list the top-level spec keys. It enforces the stated rule exactly, including a future field that Argo adds, with only standard CEL.
- Rejected: Deny only
spec.templates. It leaves other spec keys open, such asentrypoint,volumesorserviceAccountName, and does not enforce the stated rule. - Rejected: Rely on Argo
templateReferencing: Strictalone. It applies to every submitter and checks noroadmap-*prefix; ADR 0021 keeps a per-ServiceAccount policy.
- Which ServiceAccount and namespace should the policy bind to?: Bind the policy to
system:serviceaccount:devops:roadmap-servicein namespacedevops. The policy then limits only the roadmap Service and leaves other submitters alone. (best practice) [sources: k8s/devops/roadmap-service/role.yaml:68, k8s/devops/roadmap-service/admissionpolicy.yaml:45, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:70]- Chosen: Bind to the roadmap-service ServiceAccount. It applies the rule to the Service alone and follows least privilege.
- Rejected: Bind to every ServiceAccount in devops. It would change other submitters that the issue does not cover.
- How should the Service enforce the per-lane concurrency limits?: Use the Argo Workflows semaphore ConfigMap
roadmap-limitsin namespacedevops, with one key per lane (agent,research,triage,steward), and reference it from each WorkflowTemplate'ssynchronization.semaphore.configMapKeyRef. Argo reads the key when a Workflow takes the lock, so a ConfigMap edit applies to the next Workflow and a person changes a limit with one edit. The body's owner decision of 2026-11-13 sets the values; ADR 0021 section 5 records the earlier limits and the ConfigMap mechanism. (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:67, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:97, docs/SERVICE_PATTERNS.md:52, docs/SERVICE_PATTERNS.md:178]- Chosen: Argo semaphore ConfigMap. Argo reads the ConfigMap for each Workflow and applies the lane limit with no code of ours.
- Rejected: Custom controller or queue. It builds what Argo already has and adds a controller to keep.
- Rejected: Kubernetes ResourceQuota. It limits resources, not concurrent units of one lane, and cannot count Workflows by lane.
- What is the name of the item mutex that the second Workflow waits on?: The mutex name is
<row>-<owner>.<name>[-<n>], casefolded, so the item mutex isitem-<owner>.<name>-<n>, not the issue's shorthanditem-<repo>-<n>. [sources: docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md:91, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:63] - Which label selects the Workflows of one item?: The label
roadmap.devops-cli/itemholds the issue number, androadmap.devops-cli/repoholds the repository label value; the proposal'sroadmap/itemis not the project's label. [sources: docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md:77, docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md:78, docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md:79] - Does the Argo Workflows controller run Workflows in
devopstoday?: No.k8s/argo-workflows/values.yamlof dan-petty/homelab setssingleNamespace: true, andk8s/README.mdsays the controller watches onlyargo-workflows. ADR 0021 records that the engine step (feat(k8s): let Argo Workflows run roadmap pods in devops #4566) runs it with--namespaced --managed-namespace devopsandtemplateReferencing: Strict; this item waits on feat(k8s): let Argo Workflows run roadmap pods in devops #4566 for that. [sources: k8s/argo-workflows/values.yaml:25, k8s/README.md:863, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:314, docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md:50]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Watched files
A commit on the default branch that changes one of these files starts the next refine round.
k8s/argo-workflows/values.yamlsrc/devops_cli/roadmap/job_launcher.py
Activity
dan-petty commentedon Nov 21, 2026
Both change RBAC for Argo Workflows in namespace devops; 4570 gives read-only list access to the UI, and the candidate gives create and delete access to roadmap-service.devops-cli-service commentedon Nov 21, 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 (10)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 22, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies and Watched files in the section Proposed design of the body.