Repository navigation
Description
Update 2026-11-26 (infra move): the live copy of workflowtemplate-version.yaml is in dan-petty/homelab, and step 17 (#7290) deletes k8s/argo-workflows/ here.
This issue now adds the file to k8s/devops/ (copy the homelab file; its namespace stays argo-workflows), with the release marker and the deploy-stack path. homelab#23 is closed, so the removal of the homelab copy is in a new follow-up. Do it when the product copy can be applied, so one object has one owner.
Conflict: #4566 removes devops-cli-version. Decide one before a build.
Follow-up: dan-petty/homelab#315.
Split from #5135.
k8s/argo-workflows/workflowtemplate-version.yaml names the Service image with no tag. The product base k8s/devops does not render it. A release tag does not reach it. This part is deferred. tests/gate/k8s_checks/environment_freeze.py:38-75 rejects non-Markdown edits to k8s/argo-workflows/kustomization.yaml. #5134 step 17 removes k8s/argo-workflows/. The homelab copy (homelab#23) must go in the same change. The file then has one home. Acceptance criteria: - Move workflowtemplate-version.yaml from k8s/argo-workflows/ into k8s/devops/. - List it in k8s/devops/kustomization.yaml. - Remove it from k8s/argo-workflows/kustomization.yaml. - Give the Service image a release-please version marker. - Add the moved manifest as a generic extra file of release-please-config.json. - Add its path to RELEASE_FILES in src/devops_cli/release/merge_candidate.py. - Apply the moved manifest after the Argo Workflows CRDs from its new path in POST_HELM_BY_STACK of src/devops_cli/commands/k8s/stack_lifecycle.py. - Remove the homelab copy (homelab follow-up). - uv run devops ci --check --only k8s passes. The check renders WorkflowTemplate devops-cli-version from k8s/devops/kustomization.yaml and not from k8s/argo-workflows/kustomization.yaml. - uv run devops ci test tests/release/test_release_merge_pick.py passes. RELEASE_FILES equals the extra files of release-please-config.json, including the moved manifest. - uv run devops ci test tests/gate/k8s_checks/deploy_stack.py passes. Stack infra applies k8s/devops/workflowtemplate-version.yaml after the Argo Workflows CRDs.
Proposed design
Problem statement
The live copy of workflowtemplate-version.yaml is an environment file of dan-petty/homelab, and step 17 (#7290) already deleted the devops-cli copy, so the product base k8s/devops renders no WorkflowTemplate devops-cli-version. Its Service image names no tag, and the product base does not render the manifest, so a release tag never reaches the devops --version probe. This change adds the manifest to k8s/devops with a release-please version marker, lists it in the kustomization, and moves its deploy-stack post-Helm path from the environment table to the product table, so devops-cli applies one copy. The homelab copy stays until its own follow-up (homelab#315), and #4566 may remove the template later.
Acceptance criteria
Requirement: Product base renders the WorkflowTemplate
The product base k8s/devops SHALL list workflowtemplate-version.yaml in kustomization.yaml and SHALL render WorkflowTemplate devops-cli-version in namespace argo-workflows.
Scenario: The k8s row renders the product base
- WHEN
uv run devops ci --check --only k8sruns on the branch. - THEN The command reports 0 failed cases, and its new case finds WorkflowTemplate
devops-cli-versionin namespaceargo-workflowsin the render ofk8s/devops.
Requirement: The deploy stack applies the product manifest
PRODUCT_POST_HELM_BY_STACK["devops"] SHALL list workflowtemplate-version.yaml, and POST_HELM_BY_STACK SHALL list no argo-workflows/workflowtemplate-version.yaml.
Scenario: The deploy-stack dry runs
- WHEN
uv run devops ci --check --only k8sanduv run devops ci test tests/commands/k8s/test_k8s.pyrun on the branch. - THEN Both pass, the post-Helm paths of a dry run of stack
devopsholdk8s/devops/workflowtemplate-version.yaml, and a dry run of stackinfraholds nok8s/argo-workflows/workflowtemplate-version.yaml.
Requirement: The release guard admits the moved manifest
RELEASE_FILES of src/devops_cli/release/merge_candidate.py SHALL hold the moved WorkflowTemplate, so the guard accepts the release pull request that writes it.
Scenario: The release file guard
- WHEN
uv run devops ci test tests/release/test_release_merge_guards.pyruns on the branch. - THEN The test passes, and the guard reports no refusal for a release pull request that modifies the moved manifest beside
.release-please-manifest.json,CHANGELOG.md,pyproject.tomlanduv.lock.
Requirement: Pending a person after the merge
The moved manifest SHALL be a generic extra file of release-please-config.json and SHALL carry # x-release-please-version on its Service image line, so release-please rewrites the tag at each release.
Scenario: The first release pull request after the merge
- WHEN The release pull request that follows the merge opens, and a person runs
uv run --locked --no-dev python -m devops_cli.release.merge_candidate --repo dan-petty/devops-cli --app-login <release-app>[bot]withGH_TOKEN. - THEN The command prints a
number=and asha=line and no refusal, and the pull request changes the Service image line ofk8s/devops/workflowtemplate-version.yamlfrom the previous release tag to the new one, with no other change to that file.
Existing Tool Considered
No alternatives check has run. The open, maintained tool is release-please, which the project already uses for each release (release-please-config.json, .github/workflows/release.yml). Its generic extra-file updater covers the version marker: add k8s/devops/workflowtemplate-version.yaml to extra-files and put # x-release-please-version on the Service image line. It lacks a check of the YAML or of the image tag: it rewrites the version on the annotated line and validates neither the manifest nor the tag, so the k8s row covers the render and the release guard covers the write.
Key questions
- Which path applies the moved WorkflowTemplate after the Helm releases?:
PRODUCT_POST_HELM_BY_STACK["devops"]withPath("workflowtemplate-version.yaml"), placed before the CronWorkflows of the stack. The path is under--product-dir, the table already holds the two WorkflowTemplates of the devops stack, and stackdevopsdeploys after stackinfra, whose chart installs the Argo Workflows CRDs. (best practice) [sources: src/devops_cli/commands/k8s/stack_lifecycle.py:382, src/devops_cli/commands/k8s/stack_lifecycle.py:384, src/devops_cli/config/constants.py:1245, k8s/README.md:22]- Chosen: PRODUCT_POST_HELM_BY_STACK["devops"]. The path is under --product-dir, and the product base is the devops stack, which already applies its WorkflowTemplates after the charts.
- Rejected: POST_HELM_BY_STACK["infra"]. Its paths are under --k8s-dir, so a product file would resolve under the environment tree; that row holds the environment copy's path, which this change removes.
- Rejected: PRODUCT_MANIFESTS_BY_STACK["devops"]. It applies before the charts, and the WorkflowTemplate needs the Argo Workflows CRDs.
- Does the change remove the environment post-Helm path?: Yes.
POST_HELM_BY_STACK["infra"]holdsPath("argo-workflows", "workflowtemplate-version.yaml"), sodeploy-stack --stack allwould apply the homelab copy and then the product copy of the same WorkflowTemplate, with different image tags. The change removes that entry and updates the infra dry-run tests, so devops-cli applies one copy; the homelab file stays until its own follow-up. (best practice) [sources: src/devops_cli/commands/k8s/stack_lifecycle.py:376, src/devops_cli/commands/k8s/stack_lifecycle.py:382, src/devops_cli/commands/k8s/stack_lifecycle.py:1413, tests/commands/k8s/test_k8s.py:2766]- Chosen: Replace the environment path with the product path. The product copy then has one owner in deploy-stack, and the infra stack applies no object that the product base also applies.
- Rejected: Keep both paths.
--stack allapplies the same WorkflowTemplate twice, once from the homelab file and once from the product base, and the two image tags differ. - Rejected: Keep only the environment path. The product base would still render no WorkflowTemplate, and the release tag would never reach it.
- How does the Service image tag follow the release?: Add
k8s/devops/workflowtemplate-version.yamlto theextra-filesofrelease-please-config.jsonas agenericfile, and put# x-release-please-versionon the Service image line. Release-please rewrites the version there in each release pull request, andRELEASE_FILESgains the path so the release guard accepts that write. The release pull request then changes five files, so ADR 0014's line about four files takes a status-history note. (best practice) [sources: release-please-config.json:26, .release-please-manifest.json:2, src/devops_cli/release/merge_candidate.py:53, src/devops_cli/release/merge_candidate.py:160, docs/adr/0012-releases-are-derived-by-release-please-from-trunk-and-milestones-are-planning-buckets.md:161, docs/adr/0014-required-checks-gate-the-merge-and-the-pre-push-hook-runs-the-fast-static-checks.md:54, docs/adr/0040-renovate-pins-product-refs-to-release-tags.md:38]- Chosen: generic extra file with the marker. release-please already runs on each push to main, writes the version into its extra files, and ADR 0040:38 defers this move to build(k8s): move workflowtemplate-version.yaml into the product base #7141.
- Rejected: hard-code the image tag. A release does not update a hard-coded tag, so the tag would drift from the release.
- Rejected: a script that rewrites the tag. release-please already writes the version, and a second writer of the release pull request risks a conflict.
- Rejected: let Renovate bump the tag in this repository. ADR 0040 puts the grouped bump in dan-petty/homelab, and a Renovate rule here would need a token and a second writer for a value that release-please already writes.
- Which version starts the Service image tag?:
v0.231.1: the version in.release-please-manifest.jsonwith thevprefix thatinclude-v-in-taggives the release tag, which the image jobs also publish. The marker sits on that line, and release-please replaces the version at the next release. [sources: .release-please-manifest.json:2, release-please-config.json:4, .github/workflows/release.yml:185] - Does the branch change
k8s/argo-workflows/?: No.k8s/argo-workflows/no longer exists in this repository: step 17 (refactor(k8s): delete the environment files from devops-cli #7290) deleted each environment file, andtests/gate/k8s_checks/product_tree.pynow refuses any tracked non-Markdown file underk8s/outsidek8s/devops. The branch adds a file underk8s/devopsonly. [sources: docs/HOMELAB_REPO_SWITCH.md:301, tests/gate/k8s_checks/product_tree.py:49, k8s/README.md:3] - Does this issue remove the homelab copy?: No. The live copy is an environment file of dan-petty/homelab, and a pull request of this repository cannot change it; the removal is the separate homelab follow-up that the issue names (homelab#315), done once the product copy can be applied. (best practice) [sources: k8s/README.md:3, docs/HOMELAB_REPO_SWITCH.md:314, docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md:54]
- Chosen: Leave the homelab copy to the follow-up. The environment of the cluster lives only in dan-petty/homelab, and the follow-up applies the removal there once the product copy exists.
- Rejected: Remove the homelab copy in this change. This repository holds no environment file, so the branch cannot delete it.
- Does the move keep WorkflowTemplate
devops-cli-versionwhile feat(k8s): let Argo Workflows run roadmap pods in devops #4566 removes it?: Yes, the move keeps it. No record in the repository says that the engine step removes the WorkflowTemplate: ADR 0022 records only that feat(k8s): let Argo Workflows run roadmap pods in devops #4566 changes the Argo CD orphan glob fromdevops-cli-version-*todevops-cli-*, and ADR 0008 still defines the template. If feat(k8s): let Argo Workflows run roadmap pods in devops #4566 does remove it, that change deletes the product file and its three entries; this issue is not obsolete before then. (best practice) [sources: docs/adr/0022-one-repository-reference-names-the-objects-labels-and-keys-of-each-repository.md:142, docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md:15, docs/adr/0040-renovate-pins-product-refs-to-release-tags.md:38]- Chosen: Keep and move the template. The 2026-11-26 update asks for the product copy, and no delivered change removes the template.
- Rejected: Wait for feat(k8s): let Argo Workflows run roadmap pods in devops #4566 first. After refactor(k8s): delete the environment files from devops-cli #7290 the product base holds no copy, so the template would have no owner in devops-cli and a release tag would reach nothing.
- Rejected: Close this issue as not planned. No record shows that feat(k8s): let Argo Workflows run roadmap pods in devops #4566 removes the template, and the issue still asks for the product copy.
- Where does the moved manifest's content come from?: From the live copy in
k8s/argo-workflows/of dan-petty/homelab: the spec is copied unchanged, its namespace staysargo-workflows, and only the Service image line gains the release tag and the marker. The template runsdevops --versionin the Service image, so it needs no Secret and no GitHub token. [sources: docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md:54, docs/adr/0008-argo-workflows-run-the-roadmap-jobs-after-a-measured-go.md:15, docs/HOMELAB_REPO_SWITCH.md:3]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 25, 2026
Both share the goal of pinning the product base to a release tag, but #5135 is the umbrella and the candidate is one specific file-move step split from it.devops-cli-service commentedon Nov 25, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.