Skip to content

refactor(k8s): move self-hosted Renovate out of the product #6684

Done

Description

@dan-petty

Problem

Checked at devops-cli main 4ff4b7c.

Proposed remedy

  • Remove k8s/devops/renovate/ and its kustomization entry, and the 4 paths of PRODUCT_MANIFESTS_BY_STACK. Application devops prunes the CronJob, the ConfigMap and the NetworkPolicy when it syncs this revision. PVC renovate-cache and the token Secret stay; dan-petty/homelab#95 adopts the claim.
  • Delete tests/gate/k8s_checks/renovate.py, tests/invariants/test_k8s_renovate.py, src/devops_cli/k8s/renovate_token.py and tests/k8s/test_renovate_token.py. dan-petty/homelab#95 checks its render with open validators only. Update docs/TESTING.md, docs/CLUSTER.md and the spec; docs(adr): record the four homes of the infrastructure #6674 amends ADR 0027.
  • Comment on each open item above with its new home (dan-petty/homelab#95).

Acceptance criteria

  • git ls-files k8s/devops/renovate src/devops_cli/k8s/renovate_token.py tests/invariants/test_k8s_renovate.py tests/gate/k8s_checks/renovate.py | wc -l prints 0, and uv run devops ci --check --only test,k8s,kube-linter,docs,openspec passes.
  • After the sync of devops, kubectl -n devops get cronjob renovate returns NotFound, and kubectl -n devops get pvc renovate-cache -o name and the token Secret (-o name only) still exist.

Person steps

  • Merge dan-petty/homelab#95 right after Application devops syncs this change, so Renovate stops for less than one run interval (2 hours). The agent marks dan-petty/homelab#95 ready at the same time.

Dependencies

Alternatives check of 2026-11-21: not-applicable.
Class: refactor, no search.
Tool: none found.

Proposed design

Problem statement

Remove the self-hosted Renovate from the product, and keep PVC renovate-cache and Secret renovate for dan-petty/homelab#95 to adopt. ADR 0032 makes the workload a homelab instance, not a devops-cli template. The change removes the four manifests, their kustomization entry, their four stack paths, the gate check, the token module, the support helper and the manifest tests. It moves the test of the kept cluster secret row to the mirror folder. The holds are dependencies #6674, #6676 and #5134, and the merge of dan-petty/homelab#95 right after the sync.

Acceptance criteria

Requirement: The Renovate files leave the product

The repository SHALL hold no manifest of the self-hosted Renovate and no product module, gate check, support helper or test that reads it.

Scenario: The paths are absent

  • WHEN A person runs git ls-files k8s/devops/renovate src/devops_cli/k8s/renovate_token.py tests/gate/k8s_checks/renovate.py tests/invariants/test_k8s_renovate.py tests/support/renovate.py
  • THEN The command prints no path.

Requirement: The devops stack names no Renovate path

PRODUCT_MANIFESTS_BY_STACK['devops'] SHALL hold no path under k8s/devops/renovate.

Scenario: The stack list

  • WHEN A person runs uv run devops ci test tests/commands/k8s/test_k8s_devops_stack.py
  • THEN The test passes and asserts that the list of stack devops holds no path with renovate.

Requirement: The kustomization and the k8s check

k8s/devops/kustomization.yaml SHALL list no renovate resource, and the k8s check SHALL pass on the remaining stack.

Scenario: The k8s check

  • WHEN A person runs uv run devops ci --check --only k8s,kube-linter
  • THEN The check passes, because the kustomization lists no resource that the tree does not hold.

Requirement: The kept claim and Secret

After Application devops syncs the revision, CronJob renovate SHALL be gone, and PVC renovate-cache and Secret renovate SHALL remain.

Scenario: The sync of the devops Application

  • WHEN A person runs kubectl -n devops get cronjob renovate and kubectl -n devops get pvc renovate-cache -o name and kubectl -n devops get secret renovate -o name
  • THEN The first command reports NotFound, and the second and third print persistentvolumeclaim/renovate-cache and secret/renovate.

Requirement: The spec keeps the secret row and drops the workload

The change SHALL remove each renovate-service requirement that describes the CronJob, ConfigMap, PVC, NetworkPolicy and the shared preset, and SHALL keep the requirement of the cluster secret row.

Scenario: The openspec check

  • WHEN A person runs uv run devops ci --check --only openspec
  • THEN The check passes.

Requirement: The docs drop the product workload

docs/CLUSTER.md and docs/TESTING.md SHALL name no path of the self-hosted Renovate and no test of it.

Scenario: The docs check

  • WHEN A person runs git grep -n 'k8s/devops/renovate' docs/CLUSTER.md docs/TESTING.md and git grep -n 'test_k8s_renovate' docs/TESTING.md
  • THEN Both commands print no line.

Requirement: The cluster secret row keeps its test

The repository SHALL keep a test of the devops/renovate row of the cluster secret table in the folder that mirrors its package.

Scenario: The moved test

  • WHEN A person runs uv run devops ci test tests/k8s/test_cluster_secrets.py
  • THEN The test passes and asserts the three keys, their setting and keyring sources, and the optional-feature class of the row.

Requirement: Each open item names its new home

Each open item that names k8s/devops/renovate SHALL get a comment that names dan-petty/homelab#95.

Scenario: The comments on the open items

Existing Tool Considered

The alternatives check in the issue body gives not-applicable (refactor, no search) and names no tool. No open tool or library covers the need, because the change removes a workload from the product and builds no code. It has no build cost. The cost is the removal of the four manifests, the gate check, the token module, the support helper and the manifest tests, and the update of docs/CLUSTER.md, docs/TESTING.md and the renovate-service spec.

Key questions

  • Which files read the Renovate manifests and must change?: The kustomization lists renovate; the devops stack list holds the four paths; the gate check, the invariant test, the support helper and the token module read the manifests or their config; docs/TESTING.md, docs/CLUSTER.md and the renovate-service spec name them. [sources: k8s/devops/kustomization.yaml, src/devops_cli/commands/k8s/stack_lifecycle.py:335, tests/gate/k8s_checks/renovate.py, tests/invariants/test_k8s_renovate.py, tests/support/renovate.py, src/devops_cli/k8s/renovate_token.py, docs/TESTING.md:99, docs/CLUSTER.md, openspec/specs/renovate-service/spec.md]
  • Does the product keep the devops/renovate cluster secret row and the renovate. settings?*: Yes. The homelab init container runs the product image gh app-token --app renovate, so the product still writes the Secret and holds the settings. The change keeps the row test and moves it to the mirror folder. (best practice) [sources: k8s/devops/renovate/cronjob.yaml:111, src/devops_cli/k8s/cluster_secrets.py, tests/invariants/test_k8s_renovate.py, docs/TESTING.md]
    • Chosen: Keep the row and the settings, and keep the row test. The homelab init container calls gh app-token --app renovate on the product image, so the product still writes the Secret and holds the settings.
    • Rejected: Move the row and the settings to homelab. The product image reads the settings, and devops k8s push-secrets --stack devops writes the Secret.
    • Rejected: Delete the row test with the manifest tests. The row is source code that stays, and rule test(k8s): Drop the tests that repeat third-party version pins #6060 covers manifest and config values only.
  • What happens to tests/invariants/test_k8s_renovate.py?: Delete the node config test and the doc-text tests. Move the cluster secret row test to tests/k8s/test_cluster_secrets.py, the folder that mirrors src/devops_cli/k8s/. (best practice) [sources: tests/invariants/test_k8s_renovate.py, docs/TESTING.md]
    • Chosen: Delete the manifest and doc tests, and move the row test to the mirror. The manifest and doc tests go with the workload; the row test asserts source code that stays.
    • Rejected: Delete the whole file. The row stays, so its test must stay.
    • Rejected: Keep the whole file. Two tests assert manifest values, which rule test(k8s): Drop the tests that repeat third-party version pins #6060 forbids.
  • Where does the PVC renovate-cache manifest live after the change?: The product removes the manifest. dan-petty/homelab#95 declares the same claim, which stays in the cluster because it has Prune=false,Delete=false. (best practice) [sources: k8s/devops/renovate/pvc.yaml, k8s/devops/kustomization.yaml]
    • Chosen: Remove the manifest and let homelab#95 adopt the kept claim. The claim has Prune=false,Delete=false, so the product can drop the manifest with no deletion.
    • Rejected: Keep the PVC manifest in the product. The workload is a homelab instance, and the product base holds no repository-specific workload.
    • Rejected: Delete the claim. The cache holds data and the homelab run reuses it.
  • How does the change remove the renovate-service requirements of the workload?: The change folder holds a spec delta with a REMOVED entry for each workload requirement and keeps the cluster secret row requirement. The archive writes the living spec; the change does not edit the spec by hand. (best practice) [sources: CONTEXT.md, openspec/specs/renovate-service/spec.md]
    • Chosen: A spec delta with REMOVED entries. Only openspec archive writes a living spec, so the change records the removal in its delta.
    • Rejected: Edit the living spec by hand. The project forbids it.
    • Rejected: Keep the spec. The product no longer runs the capability.
  • Who merges dan-petty/homelab#95, and when?: A person merges dan-petty/homelab#95 right after Application devops syncs this change, and after dan-petty/homelab#38 merges. The agent marks homelab#95 ready at the same time. (a person decides)

Open questions

  • Who merges dan-petty/homelab#95, and when? (a person decides)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#6674, #6676, #5134

Activity

  1. added
    type/refactor
    on Nov 21, 2026
  2. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor
    • Scope: none. The title has the scope renovate, and .github/labels.yml declares no scope/renovate label. Add the label to the file to give the scope to this item.
    • Related: feat(k8s): run self-hosted Renovate as a CronJob in devops #4905, which asks for a different change. Both work on the same k8s/devops/renovate manifests, but dan-petty/devops-cli#4905 added them and this item removes them.
  3. added
    source/agent
    status/new
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 21, 2026
  4. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  5. added
    owner/agent
    on Nov 23, 2026
  6. changed the title [-]refactor(renovate): move self-hosted Renovate out of the product[/-] [+]refactor(k8s): move self-hosted Renovate out of the product[/+] on Nov 24, 2026
  7. added
    status/in-progress
    and removed
    status/new
    on Nov 24, 2026
  8. added a commit that references this issue on Nov 24, 2026
    c9bdc8d
  9. added
    status/in-review
    and removed
    status/in-progress
    on Nov 24, 2026
  10. removed
    status/in-review
    owner/agent
    on Nov 24, 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/mediumpriority/p2-mediumsource/agenttype/refactorvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions