Gitea Renovate Setup

Create a cron job in a kubernetes cluster to run renovate

Mon, 04 Mar 2024

This will give you a quick sample config to use with Gitea to run renovate against your provider.

apiVersion: v1
kind: Secret
metadata:
  name: renovate-env
  namespace: gitea
type: Opaque
stringData:
  GITHUB_COM_TOKEN: "" # used to prevent some throttling, can omit if you don't have a lot of depedencies to check
  RENOVATE_AUTODISCOVER: "true"
  RENOVATE_ENDPOINT: "https://git.yourdomain.com/api/v1/"
  RENOVATE_GIT_AUTHOR: "Renovate Bot <renovate@yourdomain.com>"
  RENOVATE_PLATFORM: 'gitea'
  RENOVATE_TOKEN: "" # Gitea token for renovate to use
  RENOVATE_REDIS_URL: "" # can point it to your gitea redis instance
  RENOVATE_USERNAME: "renovate"
  RENOVATE_PERSIST_REPO_DATA: "true"
  RENOVATE_TIMEZONE: "America/New_York"
  RENOVATE_DEPENDENCY_DASHBOARD_AUTOCLOSE: "true" # will auto close the dependecy dashboard if there is no issues
  RENOVATE_PR_CONCURRENT_LIMIT: "0"
  RENOVATE_PR_HOURLY_LIMIT: "0"
  RENOVATE_OSV_VULNERABILITY_ALERTS: "true"
---
apiVersion: batch/v1
kind: CronJob
metadata:
  name: renovate-bot
  namespace: gitea
spec:
  schedule: '@weekly' # can be daily to get more updates.  I'd suggest maybe hourly even
  concurrencyPolicy: Forbid
  successfulJobsHistoryLimit: 0
  failedJobsHistoryLimit: 1
  jobTemplate:
    spec:
      backoffLimit: 0
      ttlSecondsAfterFinished: 600
      template:
        spec:
          containers:
            - image: renovate/renovate:full
              name: renovate-bot
              env:
                - name: LOG_LEVEL
                  value: debug
              resources:
                limits: # my renovate instance liked the memory I gave it, I'm sure it'll work fine with less
                  memory: "6Gi"
                requests:
                  memory: "6Gi"
              volumeMounts:
                - name: work-volume
                  mountPath: /tmp/renovate/
          restartPolicy: Never
          volumes:
            - name: work-volume
              emptyDir: {}
Buy Me A CoffeeDigitalOcean Referral Badge
Loading...
Edward Beazer

Edward Beazer - I just like to build shit. Sometimes I get stuck for hours, even days while trying to figure out how to solve an issue or implement a new feature. Hope my tips and tutorials can save you some time.

DigitalOcean Referral Badge