Skip to content

feat(k8s): run self-hosted Renovate as a CronJob in devops #4905

Description

@dan-petty

Problem or Motivation

No Renovate instance runs for the Service repositories (#4893). The Argo controller watches only namespace argo-workflows (#4566 is not started), and that namespace allows no public HTTPS and no Secret. Renovate runs repository-defined postUpgradeTasks, which its docs call an insider-attack risk. So it must not reach the LLM gateway, Valkey or Secret devops/devops-cli. Renovate is AGPL-3.0-only, and CONTRIBUTING.md forbids AGPL components today. The owner accepted the unmodified image as an exception on 2026-11-11 ("Self-hosted Renovate anyway").

Proposed Solution & Architectural Design

Add k8s/devops/renovate/ (Application devops):

  • CronJob renovate: schedule: "17 */2 * * *" (UTC), concurrencyPolicy: Forbid, startingDeadlineSeconds: 600, backoffLimit: 0, ttlSecondsAfterFinished: 86400, activeDeadlineSeconds: 3000.
    • Init container 1 (the devops-cli Service image) runs the command of feat(github): write a Renovate App installation token to a file #4897. It writes a 1-hour installation token to an emptyDir file. Only this container mounts Secret devops/renovate.
    • The Renovate container: ghcr.io/renovatebot/renovate:<newest>@sha256:<digest>. Take the newest release at build time (44.235.0 on 2026-11-12). Command /usr/local/sbin/renovate-entrypoint.sh, args renovate. It reads the token through config.js. Until feat(deps): track regular version updates with Renovate #4893 child 6 lands, Renovate is the main container; child 6 moves it to init container 2.
    • Timeouts nest: Renovate executionTimeout 15 minutes < activeDeadlineSeconds 3000 s < token life 3600 s.
    • Security context: Pod Security restricted, runAsNonRoot, Renovate user 12021, drop ALL, seccomp RuntimeDefault, automountServiceAccountToken: false, readOnlyRootFilesystem: true. Mount emptyDir volumes on /tmp, /opt/containerbase, /var/lib/containerbase and the home directory. feat(deps): track regular version updates with Renovate #4893 child 5 measures the full list; else Trivy KSV-0014 is HIGH.
  • ConfigMap with config.js: platform: "github"; autodiscover: true (the App installation is the scope, so no repository list is copied); onboarding: true with an onboardingConfig that extends the shared preset of ci(deps): make Renovate cover every pin on a fixed schedule #4896; the token from the emptyDir file; binarySource: "install"; cacheDir on the PVC and containerbaseDir under it; repositoryCache: "enabled"; reportType: "file" with reportPath on an emptyDir; allowedCommands with anchored regexes for the project commands of ci(deps): make Renovate cover every pin on a fixed schedule #4896 and feat(deps): repin tool downloads and their sha256 for Renovate #4902 only; allowShellExecutorForPostUpgradeCommands: false; executionTimeout: 15; persistRepoData: false. Environment: RENOVATE_USE_CLOUD_METADATA_SERVICES=false, RENOVATE_X_SQLITE_PACKAGE_CACHE=true, OSV_OFFLINE_DATABASE_FORMAT=split, OSV_OFFLINE_MAX_AGE=6h. Start with RENOVATE_DRY_RUN=lookup; feat(deps): track regular version updates with Renovate #4893 child 5 removes it.
  • PVC renovate-cache: local-path, 5Gi, ReadWriteOnce, sync options Prune=false,Delete=false. It holds cacheDir, the SQLite package cache, the repository cache, the containerbase tools and the OSV database. concurrencyPolicy: Forbid gives the one-pod limit that ReadWriteOnce needs.
  • NetworkPolicy: add renovate to the NotIn list of devops-default-perimeter (the crawl4ai and searxng pattern). Add renovate-egress: CoreDNS, public TCP 443 with the same except list, and the OTel collector on 4318. No LLM gateway, no Valkey, no 6443. All Renovate hosts are public HTTPS on 443: GitHub, ghcr.io, docker.io, nvcr.io, 13 chart repositories, pypi.org, files.pythonhosted.org, registry.npmjs.org, grafana.com, dl.k8s.io, get.helm.sh and registry.opentofu.org. The OSV database comes from a github.com release of renovatebot/osv-offline.
  • Secret table: add the row devops/renovate (3 keys) to cluster_secrets.py and k8s/README.md. Add the orphan ignore entry for Secret renovate in projects.yaml.
  • License record: add an ADR: dependency updates come from self-hosted Renovate (owner choice, CronJob, own App, AGPL exception for the unmodified image only). Add a Renovate section to k8s/README.md with the license bullet in the SearXNG form. Name the exception in the open-tools rule of CONTRIBUTING.md. A patch to the image is a new decision.

If the first measured run takes more than 40 minutes, split the repositories over two CronJobs with autodiscoverFilter.

Target Subsystem

Kubernetes & Minikube Automation (self-hosted Renovate).

Existing Tool Considered

A plain Kubernetes CronJob, the standard object; Renovate's own Helm chart renders the same shape. Rejected: the Renovate Helm chart (AGPL-3.0-only, and it would widen the exception and add a chart repository to the AppProject); an Argo CronWorkflow (#4566 is not started, and an Argo pod needs egress to the API server on 6443); namespace argo-workflows (no public HTTPS, no Secret, and its gate checks lock its contents); the full Renovate image (about 2,566 MiB against about 424 MiB; binarySource: "install" installs the uv, Python and Node versions that each repository asks for).

Acceptance Criteria

  • The gate tests pass: network policies, the Secret table, the PVC sync options and the orphan list.
  • kubectl kustomize k8s/devops renders the CronJob with the pinned Renovate image digest and the Service image digest.
  • Trivy config shows no HIGH or CRITICAL finding for the new files.
  • A test checks that executionTimeout (15 minutes) < activeDeadlineSeconds (3000 s) < 3600 s.
  • A test checks that only the init container mounts Secret renovate.
  • The ADR, CONTRIBUTING.md and k8s/README.md agree on the exception.

Dependencies

#4897 (the token command). Child 4 of #4893. After the merge and the Argo CD sync, the owner runs uv run devops k8s push-secrets --only devops/renovate (#4893 owner step 4).

Source: #4893

Alternatives check of 2026-11-15: in-use.
The repository already uses this tool.
Tool: renovatebot/helm-charts (https://github.com/renovatebot/helm-charts), AGPL-3.0, last activity 2026-11-13, maintained.

Proposed design

Problem statement

No Renovate instance runs for the Service repositories. The Argo controller watches only namespace argo-workflows, which allows no public HTTPS and no Secret. Renovate runs repository-defined postUpgradeTasks, an insider-attack risk, so it must not reach the LLM gateway, Valkey, or Secret devops/devops-cli. This issue adds a self-hosted Renovate CronJob in the devops namespace with a restricted security context, a dedicated NetworkPolicy, a PVC for caching, and the license records for the AGPL exception the owner granted on 2026-11-11.

Acceptance criteria

Requirement: gate-tests-pass

The gate tests SHALL pass for network policies, the Secret table, the PVC sync options, and the orphan list.

Scenario: gate suite runs on new files

  • WHEN the gate test suite runs against the files in k8s/devops/renovate/
  • THEN all checks for network policies, the Secret table, PVC sync options, and the orphan list pass

Requirement: cronjob-renders-pinned-digests

The rendered CronJob SHALL reference the Renovate image by its sha256 digest and the Service image by its pinned digest.

Scenario: kustomize render shows digests

  • WHEN kubectl kustomize k8s/devops renders the CronJob
  • THEN the Renovate image is ghcr.io/renovatebot/renovate:<tag>@sha256:<digest> and the init container image has its pinned digest

Requirement: trivy-no-high-critical

Trivy config scanning SHALL report no HIGH or CRITICAL finding for the new files.

Scenario: trivy scan is clean

  • WHEN Trivy scans the manifests in k8s/devops/renovate/
  • THEN no finding has severity HIGH or CRITICAL

Requirement: timeout-nesting

The executionTimeout SHALL be less than activeDeadlineSeconds, which SHALL be less than the token life.

Scenario: timeout values nest

  • WHEN a test reads executionTimeout, activeDeadlineSeconds, and the token life from the CronJob and config
  • THEN executionTimeout (900 s) is less than activeDeadlineSeconds (3000 s), which is less than the token life (3600 s)

Requirement: init-only-mounts-secret

Only the init container SHALL mount Secret devops/renovate.

Scenario: secret mount is isolated

  • WHEN a test inspects the volumeMounts of each container in the CronJob pod spec
  • THEN the init container has the Secret volumeMount and the Renovate container does not

Requirement: license-records-agree

The ADR, CONTRIBUTING.md, and k8s/README.md SHALL state the same AGPL exception for the unmodified Renovate image.

Scenario: license records are consistent

  • WHEN a test reads the ADR, the open-tools rule in CONTRIBUTING.md, and the Renovate section in k8s/README.md
  • THEN all three name the exception as applying to the unmodified image only, and a patch to the image is a new decision

Existing Tool Considered

The repository already uses renovatebot/helm-charts (https://github.com/renovatebot/helm-charts), AGPL-3.0, maintained. The issue rejects the Helm chart because it is AGPL-3.0-only and would widen the exception the owner granted for the unmodified Renovate image only, and it would add a chart repository to the AppProject. The issue uses a plain Kubernetes CronJob with the unmodified ghcr.io/renovatebot/renovate image instead. The written cost of the plain CronJob is the tokens to author the CronJob, ConfigMap, PVC, NetworkPolicy, Secret table rows, ADR, CONTRIBUTING.md edit, k8s/README.md section, and the gate and unit tests, plus the elapsed time to keep them in sync with Renovate releases.

Key questions

  • Which open, maintained tool covers the need of running self-hosted Renovate as a scheduled Kubernetes workload?: The repository already uses renovatebot/helm-charts. The issue rejects the Helm chart because it is AGPL-3.0-only and would widen the exception. A plain Kubernetes CronJob with the unmodified Renovate image is the chosen approach. (best practice) [sources: CONTRIBUTING.md, k8s/devops/cronjob.yaml]
    • Rejected: Renovate Helm chart (renovatebot/helm-charts). AGPL-3.0-only, would widen the exception the owner granted for the unmodified image only, and would add a chart repository to the AppProject
    • Rejected: Argo CronWorkflow. feat(k8s): let Argo Workflows run roadmap pods in devops #4566 is not started, and an Argo pod needs egress to the API server on 6443
    • Rejected: Namespace argo-workflows. No public HTTPS, no Secret, and its gate checks lock its contents
    • Rejected: mogenius/renovate-operator (MIT). Replaces the CronJob with a controller, CRD, and RBAC, a larger in-cluster footprint than the project needs
    • Chosen: Plain Kubernetes CronJob with unmodified Renovate image. Standard object, the Renovate Helm chart renders the same shape, and the owner accepted the unmodified image as an AGPL exception
  • What schedule and concurrency settings apply to the Renovate CronJob?: Schedule 17 */2 * * * (UTC), concurrencyPolicy Forbid, startingDeadlineSeconds 600, backoffLimit 0, ttlSecondsAfterFinished 86400, activeDeadlineSeconds 3000. (best practice) [sources: k8s/devops/cronjob.yaml, k8s/devops/cronjob-runner.yaml]
    • Chosen: Every 2 hours at minute 17. Gives Renovate a 2-hour window with a 10-minute start deadline, matching activeDeadlineSeconds of 3000 s
    • Rejected: Hourly. Too frequent for a full repository scan with postUpgradeTasks
    • Rejected: Daily. Too infrequent for timely dependency updates
  • What security context applies to the Renovate pod?: Pod Security restricted: runAsNonRoot, Renovate user 12021, drop ALL capabilities, seccomp RuntimeDefault, automountServiceAccountToken false, readOnlyRootFilesystem true, with emptyDir volumes on /tmp, /opt/containerbase, /var/lib/containerbase, and the home directory. (best practice) [sources: k8s/devops/crawl4ai/deployment.yaml, k8s/devops/searxng/deployment.yaml]
    • Chosen: Pod Security restricted with emptyDir volumes. Matches the existing pattern in crawl4ai and searxng deployments, and satisfies Trivy KSV-0014
    • Rejected: Pod Security baseline. Less restrictive than the project standard used in the devops namespace
  • What is the dependency for the token command that the init container runs?: feat(github): write a Renovate App installation token to a file #4897 provides the token command. After its merge and Argo CD sync, the owner runs uv run devops k8s push-secrets --only devops/renovate. [sources: CONTRIBUTING.md]
  • What is the scope of the AGPL license exception?: The owner accepted the unmodified Renovate image as an AGPL exception on 2026-11-11. A patch to the image is a new decision. The exception does not extend to the Helm chart or any other Renovate component. [sources: CONTRIBUTING.md]
  • What PVC settings apply to the Renovate cache?: local-path, 5Gi, ReadWriteOnce, with sync options Prune=false and Delete=false. It holds cacheDir, the SQLite package cache, the repository cache, the containerbase tools, and the OSV database. (best practice) [sources: k8s/devops/roadmap-service/pvc.yaml]
    • Chosen: local-path 5Gi ReadWriteOnce with Prune=false Delete=false. Matches the existing PVC pattern in the devops namespace, and concurrencyPolicy Forbid gives the one-pod limit that ReadWriteOnce needs
    • Rejected: ephemeral volume. Loses the cache on each run, making every run slower and increasing network traffic

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4897

Activity

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

    @dan-petty
    OwnerAuthor

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

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/k8s. The (k8s) scope of the title gives the scope.
    • Priority: P2-Medium. Owner approved the feature on 2026-11-11 but no failure or advisory blocks it today.
    • Value: High. Enables automated dependency updates for Service repositories that currently receive none.
    • Effort: High. Requires CronJob, ConfigMap, PVC, NetworkPolicy, Secret, ADR, two containers, and security hardening.
    • Related: chore(deps): switch from dependabot to renovate and manage uv packages in project workflow #1219, which asks for a different change. Both concern Renovate; #1219 configures Renovate in the repository, the candidate deploys it as a CronJob with full k8s infrastructure.
  4. added
    priority/p2-medium
    on Nov 12, 2026
  5. added
    priority/p2-medium
    and removed
    priority/p2-medium
    on Nov 12, 2026
  6. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Alternatives check: in-use

    Reason: Searches and repository facts found the official Renovate Helm chart, which already packages a self-hosted Renovate run as a scheduled Kubernetes workload, so it covers the CronJob/config part of the issue. It does not cover the project-specific Secret table, NetworkPolicy, PVC sync options, gate tests and ADR, and the issue itself rejects it because the chart is AGPL-3.0-only (it would widen the accepted exception) and would add a chart repository to the AppProject; the alternative mogenius/renovate-operator (MIT) would replace the CronJob with a controller, CRD and RBAC, a larger in-cluster footprint.

    The repository already uses this tool.

    Tool: renovatebot/helm-charts (https://github.com/renovatebot/helm-charts)

    • License: AGPL-3.0
    • Last activity: 2026-11-13
    • Maintained: yes

    Covers:

    • Renders a self-hosted Renovate run as a scheduled Kubernetes workload (CronJob shape) from chart values
    • Carries the Renovate configuration and pod template (schedule, volumes, security context) instead of a hand-written manifest
    • Is actively maintained, with releases tracking the Renovate image

    Lacks:

    • The Secret devops/renovate row in cluster_secrets.py and k8s/README.md, the orphan ignore entry and the push-secrets wiring
    • The renovate-egress NetworkPolicy and the renovate entry in devops-default-perimeter
    • The renovate-cache PVC with Prune=false,Delete=false sync options and the cache/containerbase layout
    • The gate tests, the timeout-nesting test and the init-container-mounts-Secret test
    • The ADR, CONTRIBUTING.md exception and README license record
    • An allowed license: the chart is AGPL-3.0-only, so using it widens the exception the owner granted for the unmodified Renovate image only

    Tools considered:

    Searches run:

    • self-hosted Renovate dependency updates Kubernetes CronJob operator, results: 5
    • open source automated dependency update tool self-hosted, results: 5
    • renovatebot helm chart cronjob, results: 5
    • renovate-operator mogenius kubernetes, results: 5
    • "renovate" github dependency updates runner, results: 5
    • Renovate bot Kubernetes operator github, results: 5
    • renovate, results: 5
    • dependabot alternative self-hosted dependency updates, results: 5
    • renovatebot renovate github repository, results: 5
    • renovate helm chart kubernetes job schedule, results: 5

    Sources:

    Checked on 2026-11-15. A person decides what this means for the item. The check changes no label and closes no issue.

  7. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at ac493d9 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.

  8. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 16, 2026
  9. removed
    status/in-review
    owner/agent
    on Nov 16, 2026
  10. added a commit that references this issue on Nov 16, 2026
  11. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-16 20:17 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/p2-mediumscope/k8ssource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions