Renovate is one of, if not the leading tool for automated dependency updates.
With tools like Mend Renovate you can easily use renovate for free.
But what if you want to run renovate on your own hardware? What if you are running a private GitLab instance? Or just want better control over the scheduling of your renovate executions?
If you are already running Kubernetes, this project might be for you.
- At the defined time of your schedule, a renovate discovery job is started
- After the discovery finished, you will be able to see all your discovered projects in the UI
- All projects are now being set to be scheduled
- Every 10 seconds the operator checks for schedules projects and starts a new renovate job
- Only as many jobs as defined in
spec.parallelismare getting executed at the same time
helm repo add mogenius https://helm.mogenius.com/public --force-update
helm -n renovate-operator upgrade --install renovate-operator mogenius/renovate-operator --create-namespace --waitRenovateJob Configuration for GitHub
apiVersion: renovate-operator.mogenius.com/v1alpha1
kind: RenovateJob
metadata:
annotations:
name: renovate-github
namespace: renovate-operator
spec:
discoveryFilter: ###GITHUB_USERNAME###/*
extraEnv:
- name: RENOVATE_PLATFORM
value: github
- name: RENOVATE_ENDPOINT
value: https://api.github.com/
- name: RENOVATE_ALLOW_PLUGINS
value: "true"
image: renovate/renovate:41.43.3
parallelism: 5
resources:
requests:
cpu: 100m
memory: 128Mi
schedule: 0 * * * *
secretRef: renovate-secretSecret Configuration for GitHub
kind: Secret
apiVersion: v1
type: Opaque
metadata:
name: renovate-secret
namespace: renovate-operator
data:
GITHUB_COM_USER: USERNAME_BASE64_ENCODED
GITHUB_COM_TOKEN: GITHUB_TOKEN_VALUE_BASE64_ENCODED
RENOVATE_TOKEN: RENOVATE_TOKEN_VALUE_BASE64_ENCODEDGo to GitHub Fine-grained PAT and add a PAT with the following minimum permissions:
apiVersion: renovate-operator.mogenius.com/v1alpha1
kind: RenovateJob
metadata:
name: renovate-group1
namespace: renovate-operator
spec:
schedule: "0 * * * *"
discoveryFilter: "Group1/*"
image: renovate/renovate:41.43.3 # renovate
secretRef: "renovate-secret"
extraEnv:
- name: RENOVATE_ENDPOINT
value: "https://gitlab.company.com"
- name: RENOVATE_PLATFORM
value: "gitlab"
- name: RENOVATE_ALLOW_PLUGINS
value: "true"
parallelism: 1
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "1Gi"
nodeSelector:
kubernetes.io/hostname: server-1Made with contrib.rocks.
Run the test suite:
go test -v ./...Run golangci-lint locally:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint runcontroller-gen crd paths=./src/... output:crd:dir=charts/renovate-operator/crds

