Skip to content

build(k8s): pin the product base to a release tag #5135

Done

Description

@dan-petty

Problem or Motivation

Today a merge of k8s/ in devops-cli rolls the cluster at once (Argo CD tracks main), and images roll at release: Image Updater writes the digest of latest onto Application devops (argocd write-back, nothing in git). So manifests and images move at different times. After #5134, Application devops still reads devops-cli k8s/devops on main, the product ref of Application prometheus reads devops-cli main, and the homelab dashboards kustomization names the product dashboards at ?ref=vX. ADR 0013 line 36 stays true until this item.

A pin of the manifests alone at a release tag gives image and manifest skew. devops-cli had 217 releases in 15 days and 46 k8s/devops commits in 14 days. Image Updater rolls latest at each release, and homelab has no auto-merge. That is the #4036 failure. So this item is not on the cutover path. It comes after the cutover.

Proposed Solution & Architectural Design

Phase 2 of tracker #5120 (design section 10), step 18 of the corrected plan on #5120. It starts after #5134.

Owner decision (2026-11-13). After the cutover, one Renovate group pins the devops source, the prometheus product ref and the dashboards ref to a release tag, together with the image tags. Until then, everything tracks main.

  1. In homelab, one Renovate group bumps these to the same release tag: targetRevision of Application devops, the product ref of Application prometheus, the dashboards ?ref= and the image tags. Manifests and images then move in the same sync.
  2. Record the pin policy in an ADR. It changes ADR 0013 line 36 and the choice that Argo CD tracks main.
  3. Image Updater keeps its argocd write-back of the image digests on Application devops. This item changes only with the owner's consent.
  4. Move workflowtemplate-version.yaml, which names the Service image with no tag, into the base with a release-please version marker.

Check. For the next release, the render diff of the bump equals the k8s/devops diff of that release, and the images and manifests move in the same sync.

Rollback. Revert the bump PR or the pin PR.

Downtime. None. The product pods roll as at a release.

Target Subsystem

Kubernetes & Minikube Automation

Existing Tool Considered

Renovate (group rules, and managers that update git refs and image tags) and Argo CD Image Updater. Cost: about 2M tokens to build, 0.2M a quarter to keep, 3 hours.

Acceptance Criteria

  • Renovate opens one PR in the homelab repo for the next devops-cli release. The PR bumps the devops source, the prometheus product ref, the dashboards ref and the image tags together.
  • For that release, the render diff of the bump equals the k8s/devops diff of the release.
  • An ADR records the pin policy and the change to ADR 0013.
  • Image Updater still sets the digest on Application devops after the switch, unless the owner changes item 3.

Dependencies

#5134; #4905 (in-cluster Renovate); #4913. Owner: install the GitHub App that in-cluster Renovate uses on homelab before the bumps of this item start.

Alternatives check of 2026-11-19: in-use.
The repository already uses this tool.
Tool: renovatebot/renovate (https://github.com/renovatebot/renovate), AGPL-3.0, last activity 2026-11-19, maintained.
Reason: The issue already names Renovate, and its group rules and managers bump several YAML git refs and image tags in one pull request, which is the pin this item needs.

Covers:

  • One grouped pull request bumps several refs together
  • Manager rules rewrite YAML refs and image tags
  • Group and schedule rules keep one release tag

Lacks:

  • No digest write-back onto the Argo CD Application
  • No ADR record of the pin policy
  • No move of the WorkflowTemplate manifest into the base

Proposed design

Problem statement

Add the pin-policy ADR and keep the Image Updater digest write-back. Defer the homelab grouped bump to dan-petty/homelab#371 and the WorkflowTemplate move to a new issue. The product manifests and images move at different times: Application devops and the values source of Application prometheus read main, and Image Updater writes the image digest onto Application devops at each release. After the cutover (#5134), one Renovate group pins the devops source, the prometheus product ref, the dashboards ref and the image tags to one release tag, and an ADR records that policy. The move of workflowtemplate-version.yaml waits because k8s/argo-workflows/kustomization.yaml is frozen until #5134 step 17 removes that folder.

Acceptance criteria

Requirement: Pin policy ADR

The change SHALL add a new accepted record under docs/adr/ whose front matter holds issue: 5135, tracker: 5120 and amends: ["0013"], and whose decision pins the devops source, the prometheus product ref, the dashboards ref and the image tags to one release tag after the cutover.

Scenario: ADR record rules

  • WHEN A reviewer runs uv run devops ci test tests/invariants/test_adr_records.py on the change.
  • THEN The test passes, the new record links to ADR 0013, and the generated index in docs/adr/README.md holds its row.

Requirement: ADR 0013 amendment

The change SHALL set amended-by in the front matter of ADR 0013 and add one dated Status History line to it, and MUST leave the body of ADR 0013 unchanged.

Scenario: ADR 0013 body hash

  • WHEN A reviewer runs uv run devops ci test tests/invariants/test_adr_records.py on the change.
  • THEN The test passes with the recorded body-hash of ADR 0013 unchanged and its amended-by naming the new record.

Requirement: Image Updater write-back

The change MUST keep the Argo CD Image Updater write-back of image digests on Application devops, with no writeBackConfig.

Scenario: Image Updater values render

  • WHEN A reviewer runs uv run devops ci --check --only k8s on the change.
  • THEN The check passes and ImageUpdater devops in k8s/argocd/image-updater-values.yaml keeps updateStrategy: digest and no writeBackConfig for the service image.

Existing Tool Considered

The alternatives check in the issue body records verdict in-use for Renovate (renovatebot/renovate, AGPL-3.0, maintained). The check names what Renovate covers and lacks. This proposal covers the ADR part of what Renovate lacks and keeps the Image Updater digest write-back. It defers the homelab grouped bump to dan-petty/homelab#371 and the WorkflowTemplate move to a new issue.

Key questions

  • Where should the pin policy be recorded?: In a new ADR under docs/adr/ at the next free number (0040 at this commit). The record has issue: 5135, tracker: 5120 and amends: ["0013"] in its front matter. The same pull request sets amended-by: ["0040"] in ADR 0013 and adds one dated Status History line to ADR 0013. It regenerates the index in docs/adr/README.md with uv run devops docs generate. (best practice) [sources: docs/adr/README.md, docs/adr/0013-releases-use-release-please-as-it-ships-and-agents-stay-out.md]
    • Chosen: New ADR under docs/adr that amends ADR 0013. The folder holds the project decision records. The amends and amended-by keys and one Status History line are the recorded way to change the choice that Argo CD tracks main.
    • Rejected: Edit ADR 0013 in place. An accepted record body does not change. The body-hash test fails on an in-place edit.
    • Rejected: Issue comment only. A comment is not the project record. It leaves ADR 0013 line 36 as the only written policy.
  • What pin policy does the new ADR record?: After the cutover, one Renovate group pins four items to the same release tag. The items are targetRevision of Application devops, the values source of Application prometheus, the dashboards ?ref=, and the image tags. Until then all four track main. The record amends ADR 0013 line 36 and the choice that Argo CD tracks main. (best practice) [sources: k8s/argocd/apps/devops.yaml, k8s/argocd/apps/prometheus.yaml, k8s/argocd/image-updater-values.yaml, docs/adr/0013-releases-use-release-please-as-it-ships-and-agents-stay-out.md]
    • Chosen: One Renovate group after the cutover. The owner decision of 2026-11-13 records one group after the cutover. Manifests and images then move in one sync.
    • Rejected: Pin now. The issue says this item comes after the cutover. It is not on the cutover path.
    • Rejected: Pin manifests only. A manifest-only pin gives image and manifest skew. That is the refactor(roadmap): remove the dead plan and review step classes #4036 failure.
    • Rejected: Separate bumps for each ref. Separate bumps let the refs drift apart. One group keeps one release tag.
  • Should Image Updater keep its Argo CD write-back of image digests?: Yes. The change keeps the argocd write-back. ImageUpdater devops stays with updateStrategy: digest and forceUpdate: true. No writeBackConfig is added. It still writes service:latest@sha256:<digest> into spec.source.kustomize.images of Application devops and nothing into git. Only the owner can change that. (best practice) [sources: k8s/argocd/image-updater-values.yaml, k8s/argocd/apps/devops.yaml]
    • Chosen: Keep argocd write-back. The owner decision keeps it. The values file says the write-back sets the tag and digest with no git write-back.
    • Rejected: Switch to git write-back. The issue says this item changes the write-back only with the owner consent.
    • Rejected: Disable Image Updater. That changes image rollout. It is outside the pin.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#5134

Moved to new items

dan-petty/homelab#371, #7141

Activity

  1. added
    source/agent
    type/infra
    scope/k8s
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  2. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
    • Related: feat(k8s): Argo CD follows release tags #1862, which asks for a different change. Both make the cluster follow release tags, but dan-petty/devops-cli#1862 changes Argo CD targetRevision while this candidate pins the Kustomize remote base ref.
  3. added
    priority/p2-medium
    on Nov 12, 2026
  4. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at c58b592 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

    The next refine round also looks at the item again when a commit on the default branch changes one of these files: k8s/argocd/apps/devops.yaml, k8s/argocd/apps/prometheus.yaml.

  5. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    Contributor

    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:

    • Renovate group updates Kubernetes manifests git refs and image tags, results: 5
    • Renovate argocd targetRevision kustomize image tags manager, results: 5
    • renovatebot docs groupName packageRules documentation, results: 5
    • renovate kustomize manager image tag update documentation, results: 5
    • Renovate bot automated dependency updates, results: 5
    • Argo CD Image Updater write-back image digest, results: 5
    • "Renovate" dependency update tool Kubernetes, results: 5
    • renovatebot, results: 5
    • docs.renovatebot.com configuration options, results: 5
    • renovate customManagers regex image tag git ref, results: 5

    Sources:

  6. added
    status/ready
    and removed
    status/new
    on Nov 21, 2026
  7. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.

  8. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    The homelab copy (homelab#23) also holds k8s/argo-workflows/workflowtemplate-version.yaml. When this item moves the file into k8s/devops, a homelab pull request must drop the copy, or the step 10 re-sync of #5134 must leave it out, so the file has one home. #6684 (removal of k8s/devops/renovate) takes effect when Application devops syncs the revision that this item pins.

  9. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor

    Returning #5135 to New: this item is currently blocked by open prerequisite #5134 and frozen environment paths in devops-cli.

    Evidence from origin/main and GitHub:

    • #5135 lists open dependency #5134 (status/new), whose steps 12–17 remain open (dan-petty/homelab#96, #87, #75 and environment deletion).
    • The proposed design requires modifying k8s/argo-workflows/kustomization.yaml (removing workflowtemplate-version.yaml) and verifying k8s/argocd/image-updater-values.yaml via uv run devops ci --check --only k8s, while tests/gate/k8s_checks/environment_freeze.py:38-75 rejects non-Markdown edits to k8s/argo-workflows/kustomization.yaml (is_environment_path(...) == True) until step 17 removes k8s/argo-workflows/.
    • The grouped Renovate bump itself belongs in dan-petty/homelab.
  10. added
    status/new
    and removed
    status/ready
    on Nov 25, 2026
  11. added
    status/ready
    and removed
    status/new
    on Nov 25, 2026
  12. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.

  13. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 25, 2026
  14. removed
    status/in-review
    on Nov 25, 2026
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/lowpriority/p2-mediumscope/k8ssource/agenttype/infravalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions